OSDN Git Service

PR target/59839
authorjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jan 2014 19:27:28 +0000 (19:27 +0000)
committerjakub <jakub@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 16 Jan 2014 19:27:28 +0000 (19:27 +0000)
* config/i386/i386.c (ix86_expand_builtin): If target doesn't
satisfy operand 0 predicate for gathers, use a new pseudo as
subtarget.

* gcc.target/i386/pr59839.c: New test.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@206684 138bc75d-0d04-0410-961f-82ee72b054a4

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

index 4f901d8..b52ea8b 100644 (file)
@@ -1,4 +1,11 @@
-2014-01-16  Richard Henderson <rth@redhat.com>
+2014-01-16  Jakub Jelinek  <jakub@redhat.com>
+
+       PR target/59839
+       * config/i386/i386.c (ix86_expand_builtin): If target doesn't
+       satisfy operand 0 predicate for gathers, use a new pseudo as
+       subtarget.
+
+2014-01-16  Richard Henderson  <rth@redhat.com>
 
        PR debug/54694
        * reginfo.c (global_regs_decl): Globalize.
index cc53a62..8e01856 100644 (file)
@@ -29772,7 +29772,9 @@ rdrand_step:
       mode4 = insn_data[icode].operand[5].mode;
 
       if (target == NULL_RTX
-         || GET_MODE (target) != insn_data[icode].operand[0].mode)
+         || GET_MODE (target) != insn_data[icode].operand[0].mode
+         || !insn_data[icode].operand[0].predicate (target,
+                                                    GET_MODE (target)))
        subtarget = gen_reg_rtx (insn_data[icode].operand[0].mode);
       else
        subtarget = target;
index c009bf8..5dbd1ea 100644 (file)
@@ -1,5 +1,8 @@
 2014-01-16  Jakub Jelinek  <jakub@redhat.com>
 
+       PR target/59839
+       * gcc.target/i386/pr59839.c: New test.
+
        PR debug/54694
        * gcc.target/i386/pr9771-1.c (main): Rename to...
        (real_main): ... this.  Add __asm name "main".
diff --git a/gcc/testsuite/gcc.target/i386/pr59839.c b/gcc/testsuite/gcc.target/i386/pr59839.c
new file mode 100644 (file)
index 0000000..dfb8945
--- /dev/null
@@ -0,0 +1,12 @@
+/* PR target/59839 */
+/* { dg-do compile } */
+/* { dg-options "-O0 -mavx2" } */
+
+#include <x86intrin.h>
+
+void
+test (const float *x)
+{
+  __m256i i = _mm256_set1_epi32 (1);
+  __m256 d = _mm256_i32gather_ps (x, i, 1);
+}