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

login
register
mail settings
Submitter Uros Bizjak
Date May 10, 2012, 11:40 p.m.
Message ID <CAFULd4Y8siyeYZ9ujTOdV6wwQ7vMpc_Jt3-_41Wf6a5WVixo9A@mail.gmail.com>
Download mbox | patch
Permalink /patch/158411/
State New
Headers show

Comments

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

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;
 })