Hello!

> 2016-03-01  Eric Botcazou  <ebotca...@adacore.com>
>
> PR rtl-optimization/70007
> * gcse.c (compute_ld_motion_mems): Tidy up and also invalidate memory
> references present in REG_EQUAL notes attached to non-SET patterns.
>
>
> 2016-03-01  Eric Botcazou  <ebotca...@adacore.com>
>
> * gcc.target/i386/pr70007.c: New test.

The testcase will fail due to several problems:
- warning: large integer implicitly truncated to unsigned type [-Woverflow]
- warning: AVX vector argument without AVX enabled changes the ABI [-Wpsabi]
- missing int128 effective target check
- missing runtime checks for BMI2 ISA support

Attached patch fixes all of them.

Uros.
Index: testsuite/gcc.target/i386/pr70007.c
===================================================================
--- testsuite/gcc.target/i386/pr70007.c (revision 233869)
+++ testsuite/gcc.target/i386/pr70007.c (working copy)
@@ -1,8 +1,10 @@
 /* PR rtl-optimization/70007 */
-/* { dg-do run } */
-/* { dg-options "-O -fgcse -mbmi2" } */
-/* { dg-require-effective-target bmi2 } */
+/* { dg-do run { target bmi2 } } */
+/* { dg-options "-O -fgcse -mbmi2 -Wno-psabi" } */
+/* { dg-require-effective-target int128 } */
 
+#include "bmi2-check.h"
+
 typedef unsigned short v32u16 __attribute__ ((vector_size (32)));
 typedef unsigned long long v32u64 __attribute__ ((vector_size (32)));
 typedef unsigned __int128 u128;
@@ -19,11 +21,10 @@
   return v32u64_1[3];
 }
 
-int
-main (void)
+static void
+bmi2_test ()
 {
-  u128 x = foo((v32u16){~0xba31, 0x47c6}, (v32u64){64}, (v32u64){0, 
0x8b217e2514d23242, 0xac569b6dff9f82, 0x9d4cffe03c139c});
+  u128 x = foo((v32u16){(unsigned short) ~0xba31, 0x47c6}, (v32u64){64}, 
(v32u64){0, 0x8b217e2514d23242, 0xac569b6dff9f82, 0x9d4cffe03c139c});
   if (x != 0x3c74da5ca328d09)
     __builtin_abort();
-  return 0;
 }

Reply via email to