]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
re PR middle-end/68134 (float64x1_t comparison ICE on aarch64-none-elf)
authorIlya Enkovich <enkovich.gnu@gmail.com>
Tue, 17 Nov 2015 13:22:40 +0000 (13:22 +0000)
committerIlya Enkovich <ienkovich@gcc.gnu.org>
Tue, 17 Nov 2015 13:22:40 +0000 (13:22 +0000)
gcc/

PR middle-end/68134
* targhooks.c (default_get_mask_mode): Filter out
scalar modes returned by mode_for_vector.

gcc/testsuite/

PR middle-end/68134
* gcc.dg/pr68134.c: New test.

From-SVN: r230463

gcc/ChangeLog
gcc/targhooks.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/pr68134.c [new file with mode: 0644]

index 23de9802231ec1341e11528900bd225c29c59696..95439145d917bdfe2ddcc5a692e4380a60c33424 100644 (file)
@@ -1,3 +1,9 @@
+2015-11-17  Ilya Enkovich  <enkovich.gnu@gmail.com>
+
+       PR middle-end/68134
+       * targhooks.c (default_get_mask_mode): Filter out
+       scalar modes returned by mode_for_vector.
+
 2015-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/68143
index c34b4e9ef6aee9fcf7a2264fdaad90cf17fbe25d..66d983bfa04bf663695ab184efbfa33fe0ac191a 100644 (file)
@@ -1093,8 +1093,8 @@ default_get_mask_mode (unsigned nunits, unsigned vector_size)
   gcc_assert (elem_size * nunits == vector_size);
 
   vector_mode = mode_for_vector (elem_mode, nunits);
-  if (VECTOR_MODE_P (vector_mode)
-      && !targetm.vector_mode_supported_p (vector_mode))
+  if (!VECTOR_MODE_P (vector_mode)
+      || !targetm.vector_mode_supported_p (vector_mode))
     vector_mode = BLKmode;
 
   return vector_mode;
index 9f65ab5cffc0001fccceda851bfef71d12c5b5a3..b8bb337b4d1765034406583a5ce74e02c6dcc062 100644 (file)
@@ -1,3 +1,8 @@
+2015-11-17  Ilya Enkovich  <enkovich.gnu@gmail.com>
+
+       PR middle-end/68134
+       * gcc.dg/pr68134.c: New test.
+
 2015-11-17  Kyrylo Tkachov  <kyrylo.tkachov@arm.com>
 
        PR target/68143
diff --git a/gcc/testsuite/gcc.dg/pr68134.c b/gcc/testsuite/gcc.dg/pr68134.c
new file mode 100644 (file)
index 0000000..522b4c6
--- /dev/null
@@ -0,0 +1,19 @@
+/* { dg-do compile } */
+/* { dg-options "-std=c99" } */
+
+#include <stdint.h>
+
+typedef double float64x1_t __attribute__ ((vector_size (8)));
+typedef uint64_t uint64x1_t;
+
+void
+foo (void)
+{
+  float64x1_t arg1 = (float64x1_t) 0x3fedf9d4343c7c80;
+  float64x1_t arg2 = (float64x1_t) 0x3fcdc53742ea9c40;
+  uint64x1_t result = (uint64x1_t) (arg1 == arg2);
+  uint64_t got = result;
+  uint64_t exp = 0;
+  if (got != 0)
+    __builtin_abort ();
+}