]> git.ipfire.org Git - thirdparty/gcc.git/commit
re PR tree-optimization/9814 (gcc fails to optimise if (l&2) l|=2 away)
authorRoger Sayle <roger@eyesopen.com>
Fri, 27 May 2005 02:46:01 +0000 (02:46 +0000)
committerRoger Sayle <sayle@gcc.gnu.org>
Fri, 27 May 2005 02:46:01 +0000 (02:46 +0000)
commit1acdf11bd5d3eb94bf6e1fdefe5d3705cd0b3741
tree9cf44213b16d28aaf90e2b46a6d444069dfde78e
parent2c9ed0af7e94a0ab37fbbb95bb61e7b324187b69
re PR tree-optimization/9814 (gcc fails to optimise if (l&2) l|=2 away)

PR tree-optimization/9814
* ifcvt.c (noce_emit_move_insn): If we fail to recognize the move
instruction, add the necessary clobbers by re-expanding the RTL
for arithmetic operations via optab.c's expand_unop/expand_binop.
(noce_try_bitop): New function to optimize bit manipulation idioms
of the form "if (x & C) x = x op C" and "if (!(x & C) x = x op C".
(noce_process_if_block): Call noce_try_bitop.

* gcc.dg/pr9814-1.c: New test case.

From-SVN: r100240
gcc/ChangeLog
gcc/ifcvt.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr9814-1.c [new file with mode: 0644]