simplify-rtx.c (simplify_binary_operation): Unfactor the shift and rotate cases.
authorRoger Sayle <roger@eyesopen.com>
Tue, 30 May 2006 15:32:52 +0000 (15:32 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Tue, 30 May 2006 15:32:52 +0000 (15:32 +0000)
commit70233f378882c295d33065075e476487c1bd1729
tree6d1370f585fb59eba673c1d1c7a7b0721cf849ac
parentd117b270e2cb7841dd739a514fe8fac48f2225dd
simplify-rtx.c (simplify_binary_operation): Unfactor the shift and rotate cases.

* simplify-rtx.c (simplify_binary_operation): Unfactor the shift
and rotate cases.
<LSHIFTRT>: Optimize (lshiftrt (clz X) C) as (eq X 0) where C is
log2(GET_MODE_BITSIZE(X)) on targets with the appropriate semantics.

* gcc.target/ppc-eq0-1.c: New test case.
* gcc.target/ppc-negeq0-1.c: New test case.

From-SVN: r114239
gcc/ChangeLog
gcc/simplify-rtx.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/powerpc/ppc-eq0-1.c [new file with mode: 0644]
gcc/testsuite/gcc.target/powerpc/ppc-negeq0-1.c [new file with mode: 0644]