]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/59839 (i686 AVX2 gather intrinsic not compiling with -O0 on mingw w64)
authorJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 Jan 2014 19:27:28 +0000 (20:27 +0100)
committerJakub Jelinek <jakub@gcc.gnu.org>
Thu, 16 Jan 2014 19:27:28 +0000 (20:27 +0100)
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.

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

From-SVN: r206684

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

index 4f901d895e416349a54182bf8c361a9d7f44fd44..b52ea8b58dea279d4e9a13875a7b6f135e70e0c1 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 cc53a6262d15485706f42e129104982799729bd5..8e0185623a38b3dce0bc96031ec6dcd1703de44c 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 c009bf8a0c2a305bcf05f35e33d1b8ff043c25af..5dbd1ea8781ba04a27f75ef04b8553d4f7d6e7d5 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);
+}