[Bug tree-optimization/95185] Failure to optimize specific kind of sign comparison check
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95185 Arjun Shankar changed: What|Removed |Added CC||arjun.is at lostca dot se --- Comment #3 from Arjun Shankar --- If the code is compiled as C, gcc produces essentially the same code as clang with some differences in the schedule of instructions: https://godbolt.org/z/8nsq16Pen It's when the code is compiled as C++ that gcc does worse: https://godbolt.org/z/dK8hTEhjr The difference lies in the front-ends. The C front-end already appears to know that this is a XOR. testcase.c.004t.original looks like: return (int) (x < 0 ^ y <= 0); On the other hand, g++ outputs: return = x >= 0 == y <= 0;
[Bug middle-end/19987] [meta-bug] fold missing optimizations in general
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=19987 Bug 19987 depends on bug 95176, which changed state. Bug 95176 Summary: Failure to optimize division followed by multiplication to modulo followed by subtraction https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95176 What|Removed |Added Status|NEW |RESOLVED Resolution|--- |FIXED
[Bug tree-optimization/95176] Failure to optimize division followed by multiplication to modulo followed by subtraction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95176 Arjun Shankar changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |12.0 Resolution|--- |FIXED --- Comment #3 from Arjun Shankar --- This should make it to GCC 12 when it's released, so I'm closing it accordingly.
[Bug tree-optimization/97223] Failure to optimize comparison of char arithmetic to single comparison
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=97223 Arjun Shankar changed: What|Removed |Added Status|NEW |RESOLVED Target Milestone|--- |11.0 Resolution|--- |FIXED CC||arjun.is at lostca dot se --- Comment #5 from Arjun Shankar --- Looks like this was fixed by the time GCC 11 was released. I'm closing this bug out.
[Bug tree-optimization/95176] Failure to optimize division followed by multiplication to modulo followed by subtraction
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95176 Arjun Shankar changed: What|Removed |Added CC||arjun.is at lostca dot se --- Comment #2 from Arjun Shankar --- This appears to have been fixed as bug 96696 via the following commit: https://gcc.gnu.org/g:3dcd1334b4f522352b80814513fdca902fc2a207