Comments
Patch
===================================================================
@@ -18911,6 +18911,9 @@ ix86_expand_sse_movcc (rtx dest, rtx cmp, rtx op_t
{
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)
===================================================================
@@ -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]);
+}
Hello! 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. testsuite/ChangeLog: 2011-09-22 Uros Bizjak <ubizjak@gmail.com> PR target/50482 * gcc.target/i386/pr50482.c: New test. Tested on x86_64-pc-linux-gnu {,-m32}, committed to mainline SVN. Uros.