[Bug tree-optimization/110410] [14 Regression] Different results between -O0 and -O2
jwzeng at nuaa dot edu.cn
gcc-bugzilla@gcc.gnu.org
Mon Jun 26 12:32:50 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=110410
--- Comment #3 from Jw Zeng <jwzeng at nuaa dot edu.cn> ---
(In reply to Richard Biener from comment #2)
> phi-opt again?
Link to the Compiler Explorer:https://godbolt.org/z/EeEqMGnWo
I reduced the code again, I hope it helps. The reduced code is as follows:
#include <stdio.h>
int var_1 = 1;
int var_2 = 0;
unsigned short var_3 = 7472;
int var_4 = 518868156U;
unsigned var_5;
#define min(a, b) ((a) < (b) ? (a) : (b))
int main() {
var_5 = min(var_1 ? var_3 >> (var_4 - 518868145U) : var_2, 1);
printf("%d\n", var_5);
return 0;
}
More information about the Gcc-bugs
mailing list