[Bug rtl-optimization/115506] Possible but missed "cmp" instruction merging (x86 & ARM, optimization)

2024-06-17 Thread Explorer09 at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115506 --- Comment #3 from Kang-Che Sung --- I'm not sure if this helps, but the idea is to recognize three-way comparison as a special case. My code was originally written in this ordering: ```c if (x < c) { do_action_a(); } else if (x == c) { d

[Bug rtl-optimization/115506] Possible but missed "cmp" instruction merging (x86 & ARM, optimization)

2024-06-17 Thread ubizjak at gmail dot com via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115506 --- Comment #2 from Uroš Bizjak --- For the original testcase tree optimizers optimize to: [local count: 114863530]: _30 = _2 & 240; if (_30 == 224) goto ; [34.00%] else goto ; [66.00%] [local count: 75809929]: if (_30 <=

[Bug rtl-optimization/115506] Possible but missed "cmp" instruction merging (x86 & ARM, optimization)

2024-06-16 Thread rguenth at gcc dot gnu.org via Gcc-bugs
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=115506 Richard Biener changed: What|Removed |Added Component|middle-end |rtl-optimization --- Comment #1 from R