[Bug tree-optimization/111167] swapping around duplicated conditionals can produce better code

2023-08-27 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 --- Comment #2 from Andrew Pinski --- >Take reduced from GCC's sources for lookup_attribute: Note it shows up even not in a reduced version of lookup_attribute too.

[Bug tree-optimization/111167] swapping around duplicated conditionals can produce better code

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 --- Comment #1 from Andrew Pinski --- In this case the problem seems to be jump threading related. If we did: ``` void f(int); void lookup_attribute1(const char *attr_ns, int list, int t) { short t1; if (attr_ns) { if (list) {t1 = 0; goto

[Bug tree-optimization/111167] swapping around duplicated conditionals can produce better code

2023-08-26 Thread pinskia at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=67 Andrew Pinski changed: What|Removed |Added Severity|normal |enhancement