]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR target/85193 (ICE: SIGSEGV in memory_operand at recog.c:1361 with -O2 -fno...
authorUros Bizjak <ubizjak@gmail.com>
Thu, 5 Apr 2018 20:32:18 +0000 (22:32 +0200)
committerUros Bizjak <uros@gcc.gnu.org>
Thu, 5 Apr 2018 20:32:18 +0000 (22:32 +0200)
PR target/85193
* config/i386/i386.md (define_attr "memory"): Handle rotate1 type.

testsuite/ChangeLog:

PR target/85193
* gcc.target/i386/pr85193.c: New test.

From-SVN: r259153

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

index 5361dff878bbc28f1b2333275285fc93bde39256..aeaee798e9cab7f4ab24050a46440d138cb51deb 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/85193
+       * config/i386/i386.md (define_attr "memory"): Handle rotate1 type.
+
 2018-04-02  Peter Bergner  <bergner@vnet.ibm.com>
 
        Backport from mainline
index d2bfe314f719dd52cf814e5042318dbff5b0a616..b6f6d69238e5d389df643a560a83c3ea5b02f2f8 100644 (file)
           (if_then_else (match_operand 1 "constant_call_address_operand")
             (const_string "none")
             (const_string "load"))
-        (and (eq_attr "type" "alu1,negnot,ishift1,sselog1,sseshuf1")
+        (and (eq_attr "type" "alu1,negnot,ishift1,rotate1,sselog1,sseshuf1")
              (match_operand 1 "memory_operand"))
           (const_string "both")
         (and (match_operand 0 "memory_operand")
         (match_operand 1 "memory_operand")
           (const_string "load")
         (and (eq_attr "type"
-                "!alu1,negnot,ishift1,
+                "!alu1,negnot,ishift1,rotate1,
                   imov,imovx,icmp,test,bitmanip,
                   fmov,fcmp,fsgn,
                   sse,ssemov,ssecmp,ssecomi,ssecvt,ssecvt1,sseicvt,
index 72c32dc4d5e07d03c489c2d118fe6baa1f8b010f..b9988f541a23ff7853e3238e007c02d08fcbe54e 100644 (file)
@@ -1,3 +1,8 @@
+2018-04-05  Uros Bizjak  <ubizjak@gmail.com>
+
+       PR target/85193
+       * gcc.target/i386/pr85193.c: New test.
+
 2018-04-02  Peter Bergner  <bergner@vnet.ibm.com>
 
        Backport from mainline
diff --git a/gcc/testsuite/gcc.target/i386/pr85193.c b/gcc/testsuite/gcc.target/i386/pr85193.c
new file mode 100644 (file)
index 0000000..98e3daf
--- /dev/null
@@ -0,0 +1,17 @@
+/* { dg-do compile } */
+/* { dg-options "-Wno-psabi -O2 -fno-tree-ccp -fno-tree-fre -mno-sse" } */
+
+typedef unsigned char U __attribute__((vector_size(16)));
+typedef unsigned int V __attribute__((vector_size(16)));
+typedef unsigned long long W __attribute__((vector_size(16)));
+
+extern void bar(U, U);
+
+V v;
+
+void
+foo(U f)
+{
+  f[0] = f[0] << (unsigned char)~v[0] | f[~((W)(U){0, 0, 0, 0, 0, 0, 0, 0, 5})[1] & 5] >> (-(unsigned char)~v[0] & 7);
+  bar(f, (U){});
+}