Skip to content

Commit 8c24011

Browse files
committed
testsuite: Add testcase for already fixed PR112518
This PR has been fixed by the PR112526 fix. 2023-11-22 Jakub Jelinek <[email protected]> PR target/112518 * gcc.target/i386/bmi2-pr112518.c: New test.
1 parent 65bd6de commit 8c24011

File tree

1 file changed

+25
-0
lines changed

1 file changed

+25
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/* PR target/112518 */
2+
/* { dg-do run { target { bmi2 && int128 } } } */
3+
/* { dg-options "-Os -mbmi2" } */
4+
5+
#include "bmi2-check.h"
6+
7+
unsigned u;
8+
int g;
9+
10+
unsigned long long
11+
foo (int i)
12+
{
13+
unsigned long long x = u;
14+
g = __builtin_mul_overflow_p (u, ((unsigned __int128) 4292468825) << 64 | 150, 0);
15+
x |= g % i;
16+
return x;
17+
}
18+
19+
static __attribute__((noipa)) void
20+
bmi2_test ()
21+
{
22+
unsigned long long x = foo (3);
23+
if (x)
24+
__builtin_abort ();
25+
}

0 commit comments

Comments
 (0)