aboutsummaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/i386/pr85860.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/gcc.target/i386/pr85860.c')
-rw-r--r--gcc/testsuite/gcc.target/i386/pr85860.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/pr85860.c b/gcc/testsuite/gcc.target/i386/pr85860.c
new file mode 100644
index 00000000000..aef78a4b958
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr85860.c
@@ -0,0 +1,23 @@
+/* { dg-do compile { target lp64 } } */
+/* { dg-options "-O2 -fno-guess-branch-probability -flive-range-shrinkage -mbmi2" } */
+
+int a, b, c, d, e;
+
+extern int bar(void);
+
+__int128
+foo (unsigned g, int h, long i, __int128 j, short k, __int128 l)
+{
+ unsigned __int128 m = j;
+ do
+ {
+ j %= 5;
+ c = c >> (m & 31);
+ e = __builtin_sub_overflow (b, 0, &m);
+ d = bar ();
+ l *= __builtin_mul_overflow_p ((unsigned) d, ~(unsigned __int128) 1,
+ (unsigned __int128) 0);
+ }
+ while (a);
+ return m + j + k + l;
+}