This is to give a chance to the TARGET_MODE_REP_EXTENDED machinery to remove
another truncate as in:
(set (reg:SI A) (truncate:SI (reg:DI B)))
(set (reg:SI C) (and:SI (reg:SI A) (const_int 0xfff)))
->
(set (subreg:DI (reg:SI C)) (and:DI (reg:DI B) (const_int 0xfff)))
Bootstrapped and regtested on {mips64octeon,x86_64}-linux and regtested on
mipsisa64r2-elf. No assembly change in gcc.c-torture/execute for x86_64.
OK after the bug-fix patch from yesterday?
Adam
* simplify-rtx.c (simplify_binary_operation_1) <AND>: Transform (and
(truncate)) into (truncate (and)).
testsuite/
* gcc.target/mips/truncate-5.c: New test.