[Bug tree-optimization/116120] [15 regression] Wrong code for (a ? x : y) != (b ? x : y) since r15-2106-g44fcc1ca11e7ea35dc9fb25a5317346bc1eaf7b2
pinskia at gcc dot gnu.org
gcc-bugzilla@gcc.gnu.org
Sun Jul 28 00:57:59 GMT 2024
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=116120
--- Comment #2 from Andrew Pinski <pinskia at gcc dot gnu.org> ---
That is:
```
v4si f3(v4si a, v4si b, v4si c, v4si d, v4si e, v4si f) {
v4si X = a == b;
v4si Y = c == d;
return ((X^Y) & (e != f)) ? {-1,...} : {0};
}
```
is what we should produce. Note this is still better code generation than the
original with `?:`. And for the constant case `e != f` will be reduced to 0/-1
just fine.
More information about the Gcc-bugs
mailing list