re PR target/42891 (ice in extract_insn, at recog.c:2097)
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 28 Jan 2010 17:58:03 +0000 (18:58 +0100)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 28 Jan 2010 17:58:03 +0000 (18:58 +0100)
PR target/42891
* config/i386/i386.c (ix86_expand_int_movcc): Convert tmp to SImode
in the call to gen_x86_movsicc_0_m1.

testsuite/ChangeLog:

PR target/42891
* gcc.target/i386/pr42891.c: New test.

From-SVN: r156327

gcc/ChangeLog
gcc/config/i386/i386.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.target/i386/pr42891.c [new file with mode: 0644]

index ff0e868649b5c80b683f19682e46c20ecd2dc2ad..cae4c13378716b1e709d543346dd3e7b742b672e 100644 (file)
@@ -1,3 +1,9 @@
+2010-01-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/42891
+       * config/i386/i386.c (ix86_expand_int_movcc): Convert tmp to SImode
+       in the call to gen_x86_movsicc_0_m1.
+
 2010-01-28  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/42871
@@ -17,7 +23,7 @@
 
 2010-01-28  Razya Ladelsky  <razya@il.ibm.com>
 
-       * tree-parloops.c (transform_to_exit_first_loop): Update the basic 
+       * tree-parloops.c (transform_to_exit_first_loop): Update the basic
        block list passed to gimple_duplicate_sese_tail.
        (parallelize_loops): Avoid parallelization when the function
        has_nonlocal_label.
@@ -91,7 +97,7 @@
        PR target/42841
        * config/sh/sh.c (find_barrier): Increase length for non delayed
        conditional branches.
-       
+
 2010-01-27  Matthias Klose  <doko@ubuntu.com>
 
        * configure.ac (gnu-unique-object): Fix ldd version check.
 
 2010-01-21  Andrew Haley  <aph@redhat.com>
 
-        * gcc.c (process_command): Move lang_specific_driver before
-        setting cc_libexec_prefix.
+       * gcc.c (process_command): Move lang_specific_driver before
+       setting cc_libexec_prefix.
 
 2010-01-21  Richard Guenther  <rguenther@suse.de>
 
index 84b652f2f8129f6fb55257004c049b9ffe4d4934..5bc4a64a29d06161bfe1e1b8d77895e71727726d 100644 (file)
@@ -15381,7 +15381,7 @@ ix86_expand_int_movcc (rtx operands[])
   enum rtx_code code = GET_CODE (operands[1]), compare_code;
   rtx compare_seq, compare_op;
   enum machine_mode mode = GET_MODE (operands[0]);
-  bool sign_bit_compare_p = false;;
+  bool sign_bit_compare_p = false;
 
   start_sequence ();
   ix86_compare_op0 = XEXP (operands[1], 0);
@@ -15422,7 +15422,6 @@ ix86_expand_int_movcc (rtx operands[])
           if (!sign_bit_compare_p)
            {
              rtx flags;
-             rtx (*insn)(rtx, rtx, rtx);
              bool fpcmp = false;
 
              compare_code = GET_CODE (compare_op);
@@ -15463,11 +15462,10 @@ ix86_expand_int_movcc (rtx operands[])
                tmp = gen_reg_rtx (mode);
 
              if (mode == DImode)
-               insn = gen_x86_movdicc_0_m1;
+               emit_insn (gen_x86_movdicc_0_m1 (tmp, flags, compare_op));
              else
-               insn = gen_x86_movsicc_0_m1;
-
-             emit_insn (insn (tmp, flags, compare_op));
+               emit_insn (gen_x86_movsicc_0_m1 (gen_lowpart (SImode, tmp),
+                                                flags, compare_op));
            }
          else
            {
index 4279696234153a0c7d2b17c7fd0ff0b360b46333..b754ad45bd21a0dde37b9ae32dc8be44a86ec700 100644 (file)
@@ -1,3 +1,8 @@
+2010-01-28  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/42891
+       * gcc.target/i386/pr42891.c: New test.
+
 2010-01-28  Richard Guenther  <rguenther@suse.de>
 
        PR tree-optimization/42871
diff --git a/gcc/testsuite/gcc.target/i386/pr42891.c b/gcc/testsuite/gcc.target/i386/pr42891.c
new file mode 100644 (file)
index 0000000..e3c7b9c
--- /dev/null
@@ -0,0 +1,13 @@
+/* { dg-do compile } */
+/* { dg-options "-O2" } */
+
+union B { int i; float f; };
+
+extern void bar (void);
+
+void
+foo (union B x, union B y)
+{
+  if (!(y.f > x.i))
+    bar ();
+}