[Bug rtl-optimization/97784] Expressions evaluated as long chain instead of as tree or the like

2020-11-10 Thread segher at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97784 --- Comment #2 from Segher Boessenkool --- No, it is exactly the same with unsigned types :-( Use -Dlong="unsigned long" or use #define O ^ (as in my original test). I forgot about this signed thing, but it has nothing to do with it (that

[Bug rtl-optimization/97784] Expressions evaluated as long chain instead of as tree or the like

2020-11-10 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97784 --- Comment #1 from Andrew Pinski --- Reassociation is done for signed types and places where it could introduce overflows. If you -fwrapv, you should get the optimization. Likewise for unsigned types.