Skip to content
Snippets Groups Projects
Commit 5fd2537b authored by Jakub Jelinek's avatar Jakub Jelinek
Browse files

testsuite: Add further testcase for already fixed PR [PR109778]

I came up with a testcase which reproduces all the way to r10-7469.
LTO to avoid early inlining it, so that ccp handles rotates and not
shifts before they are turned into rotates.

2023-05-09  Jakub Jelinek  <jakub@redhat.com>

	PR tree-optimization/109778
	* gcc.dg/lto/pr109778_0.c: New test.
	* gcc.dg/lto/pr109778_1.c: New file.

(cherry picked from commit c2cf2dc9)
parent 97f404d5
No related branches found
No related tags found
No related merge requests found
/* PR tree-optimization/109778 */
/* { dg-lto-do run } */
/* { dg-lto-options { "-O2 -flto" } } */
/* { dg-require-effective-target int32 } */
int bar (int);
__attribute__((noipa)) int
foo (int x)
{
x = bar (x);
x = (x << 16) | (int) ((unsigned) x >> 16);
return x & 0x10000000;
}
int
main ()
{
if (foo (0) || foo (-1))
__builtin_abort ();
return 0;
}
int
bar (int x)
{
x &= 0x22222222;
x |= (int) 0xf1234567U;
return x;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment