-
Notifications
You must be signed in to change notification settings - Fork 15.2k
Closed
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization
Description
Consider the following.
https://godbolt.org/z/Tzzx1aveT
int foo(int a, int b, int c)
{
return ((a ^ b) & c) | a;
}
int bar(int a, int b, int c)
{
return a | (b & c);
}
Alive2 proof (I used i16
to prevent timeout.)
https://alive2.llvm.org/ce/z/CReg2u
Original test (gcc testsuite):
https://github.com/gcc-mirror/gcc/blob/master/gcc/testsuite/gcc.dg/tree-ssa/pr109938.c
Metadata
Metadata
Assignees
Labels
llvm:instcombineCovers the InstCombine, InstSimplify and AggressiveInstCombine passesCovers the InstCombine, InstSimplify and AggressiveInstCombine passesmissed-optimization