]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/50482 (internal compiler error at recog.c:2137)
authorUros Bizjak <uros@gcc.gnu.org>
Thu, 22 Sep 2011 17:35:00 +0000 (19:35 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 22 Sep 2011 17:35:00 +0000 (19:35 +0200)
PR target/50482
* config/i386/i386.c (ix86_expand_sse_movcc): When generating
blendv, force op_true to register if it doesn't satisfy
nonimmediate_operand predicate.

testsuite/ChangeLog:

PR target/50482
* gcc.target/i386/pr50482.c: New test.

From-SVN: r179094

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

index ed624bb35f50609b375983fe758a2d8142a07f08..a0c8b075ec309864bf26d3af935d6f6fe86485d3 100644 (file)
@@ -1,3 +1,10 @@
+2011-09-22  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/50482
+       * config/i386/i386.c (ix86_expand_sse_movcc): When generating
+       blendv, force op_true to register if it doesn't satisfy
+       nonimmediate_operand predicate.
+
 2011-09-22  Richard Sandiford  <rdsandiford@googlemail.com>
 
        PR middle-end/50113
@@ -18,8 +25,7 @@
        * ipa-inline.c (ipa_inline): Likewise; do not call
        ipa_create_all_structures_for_iinln.
        (ipa_inline): Always free jump functions.
-       * ipa-inline-analysis.c (evaluate_conditions_for_edge): Remove
-       hack.
+       * ipa-inline-analysis.c (evaluate_conditions_for_edge): Remove hack.
        (remap_edge_predicates): Fix pasto.
        (inline_merge_summary): Remove nlined edge predicate; remove hack.
        (inline_analyze_function): Always initialize jump functions.
index f952d2e758b539e9dcab5de9796b451ad64ae51a..954b879c0fc0872b0ed7af1bf49a48ec97c1598c 100644 (file)
@@ -18911,6 +18911,9 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_true, rtx op_false)
     {
       rtx (*gen) (rtx, rtx, rtx, rtx) = NULL;
 
+      if (!nonimmediate_operand (op_true, mode))
+       op_true = force_reg (mode, op_true);
+
       op_false = force_reg (mode, op_false);
 
       switch (mode)
index 696f257ec137040a035cc5889b4e618e5b1e80cd..b9d638ff879e1ca3cb3229fd4987b9748221b311 100644 (file)
@@ -1,3 +1,8 @@
+2011-09-22  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/50482
+       * gcc.target/i386/pr50482.c: New test.
+
 2011-09-22  Joseph Myers  <joseph@codesourcery.com>
 
        * gcc.target/i386/pad-2.c, gcc.target/i386/pad-3.c,
@@ -40,7 +45,7 @@
 2011-09-21  Uros Bizjak  <ubizjak@gmail.com>
 
        * g++.dg/other/i386-3.C: Remove duplicated dg-options.
-       * g++.dg/other/i386-4.C: Remove dg-requre-effective-target directive.
+       * g++.dg/other/i386-4.C: Remove dg-require-effective-target directive.
        * g++.dg/other/i386-8.C: Ditto.
        * g++.dg/other/pr34435.C: Ditto.
        * g++.dg/other/pr39496.C: Ditto.
diff --git a/gcc/testsuite/gcc.target/i386/pr50482.c b/gcc/testsuite/gcc.target/i386/pr50482.c
new file mode 100644 (file)
index 0000000..64c2686
--- /dev/null
@@ -0,0 +1,11 @@
+/* { dg-do compile } */
+/* { dg-options "-O3 -msse4" } */
+
+void
+test (int code, unsigned int * image, int * colors)
+{
+  int i;
+
+  for (i = 0; i < code; ++i)
+    image[i] = (colors[i] < 0 ? ~(unsigned int) 0 : colors[i]);
+}