diff options
author | Jakub Jelinek <jakub@redhat.com> | 2023-11-22 11:31:12 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@redhat.com> | 2023-11-22 11:32:54 +0100 |
commit | 8c24011b2ba0f268e74b72519fc8119c2c99d92b (patch) | |
tree | 94cee84c5a7b86394b50031033444b88c1f5cef4 | |
parent | 65bd6de0de57abc86931a5e0b9a8d453ad530004 (diff) | |
download | gcc-8c24011b2ba0f268e74b72519fc8119c2c99d92b.zip gcc-8c24011b2ba0f268e74b72519fc8119c2c99d92b.tar.gz gcc-8c24011b2ba0f268e74b72519fc8119c2c99d92b.tar.bz2 |
testsuite: Add testcase for already fixed PR112518
This PR has been fixed by the PR112526 fix.
2023-11-22 Jakub Jelinek <jakub@redhat.com>
PR target/112518
* gcc.target/i386/bmi2-pr112518.c: New test.
-rw-r--r-- | gcc/testsuite/gcc.target/i386/bmi2-pr112518.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/gcc/testsuite/gcc.target/i386/bmi2-pr112518.c b/gcc/testsuite/gcc.target/i386/bmi2-pr112518.c new file mode 100644 index 0000000..6aea13f --- /dev/null +++ b/gcc/testsuite/gcc.target/i386/bmi2-pr112518.c @@ -0,0 +1,25 @@ +/* PR target/112518 */ +/* { dg-do run { target { bmi2 && int128 } } } */ +/* { dg-options "-Os -mbmi2" } */ + +#include "bmi2-check.h" + +unsigned u; +int g; + +unsigned long long +foo (int i) +{ + unsigned long long x = u; + g = __builtin_mul_overflow_p (u, ((unsigned __int128) 4292468825) << 64 | 150, 0); + x |= g % i; + return x; +} + +static __attribute__((noipa)) void +bmi2_test () +{ + unsigned long long x = foo (3); + if (x) + __builtin_abort (); +} |