https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116101
Bug ID: 116101
Summary: [14/15 Regression] isel duplicates comparisons even at
-O0
Product: gcc
Version: 15.0
Status: UNCONFIRMED
Keywords: internal-improvement
Severity: normal
Priority: P3
Component: tree-optimization
Assignee: unassigned at gcc dot gnu.org
Reporter: pinskia at gcc dot gnu.org
Target Milestone: ---
Take this gimple testcase:
```
int __GIMPLE() f(int a, int b, int c, int d, int e)
{
_Bool t;
int ff;
int gg;
int res;
t = a == b;
ff = t ? a : e;
gg = t ? d : b;
res = ff+gg;
return res;
}
```
At -O0, isel will duplicate the comparison for `a == b` even at -O0 (or rather
when -fno-tree-ter is in effect). We should disable at -O0 (maybe when
-fno-tree-ter).