[Bug rtl-optimization/83123] Int compare - different asm code for different return type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83123 Andrew Pinski changed: What|Removed |Added Resolution|--- |DUPLICATE Status|NEW |RESOLVED --- Comment #4 from Andrew Pinski --- Handled by 95731. *** This bug has been marked as a duplicate of bug 95731 ***
[Bug rtl-optimization/83123] Int compare - different asm code for different return type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83123 --- Comment #3 from Andrew Pinski --- This is now optimized at the gimple level to just: _7 = a_3(D) & b_4(D); _8 = _7 < 0;
[Bug rtl-optimization/83123] Int compare - different asm code for different return type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83123 Andrew Pinski changed: What|Removed |Added Known to fail||10.3.0 Known to work||11.1.0 Severity|normal |enhancement Target Milestone|--- |11.0
[Bug rtl-optimization/83123] Int compare - different asm code for different return type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83123 --- Comment #2 from Segher Boessenkool --- In the first case (with the extend to SImode) the extend is combined with the AND, to an AND in SImode. After that, the 3-insn combination of the two shifts with the AND is something combine knows how to split. In the second case this of course does not happen.
[Bug rtl-optimization/83123] Int compare - different asm code for different return type
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=83123 Richard Biener changed: What|Removed |Added Keywords||missed-optimization Target||x86_64-*-*, i?86-*-* Status|UNCONFIRMED |NEW Last reconfirmed||2017-11-23 CC||segher at gcc dot gnu.org Component|c |rtl-optimization Ever confirmed|0 |1 --- Comment #1 from Richard Biener --- The first case is somehow optimized by combine while the latter is not. The gimple is almost equal, so is the expanded RTL. test1 (int a, int b) { _Bool _1; _Bool _2; _Bool _3; int _6; [local count: 1073741825]: _1 = a_4(D) < 0; _2 = b_5(D) < 0; _3 = _1 & _2; _6 = (int) _3; return _6; test2 (int a, int b) { _Bool _1; _Bool _2; _Bool _3; [local count: 1073741825]: _1 = a_4(D) < 0; _2 = b_5(D) < 0; _3 = _1 & _2; return _3;