[i386] : Fix PR 53291, Code generated for xtest is wrong

Submitted by Uros Bizjak on May 10, 2012, 11:40 p.m.

Details

Message ID CAFULd4Y8siyeYZ9ujTOdV6wwQ7vMpc_Jt3-_41Wf6a5WVixo9A@mail.gmail.com
State New
Headers show

Commit Message

Uros Bizjak May 10, 2012, 11:40 p.m.
Hello!

2012-05-11  Uros Bizjak  <ubizjak@gmail.com>

	PR target/53291
	* config/i386/i386.md (xtest): Use NE condition in ix86_expand_setcc.

Tested on x86_64-pc-linux-gnu {,-m32}, and by Andi.

Committed to mainline SVN.

Uros.

Patch hide | download patch | download mbox

Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 187372)
+++ config/i386/i386.md (working copy)
@@ -18422,7 +18422,7 @@ 
 {
   emit_insn (gen_xtest_1 ());

-  ix86_expand_setcc (operands[0], EQ,
+  ix86_expand_setcc (operands[0], NE,
                     gen_rtx_REG (CCZmode, FLAGS_REG), const0_rtx);
   DONE;
 })