https://gcc.gnu.org/bugzilla/show_bug.cgi?id=96187
Richard Biener changed:
What|Removed |Added
Host|x86_64 |
Status|UNCONFIRMED |NEW
Target|x86_64 |x86_64-*-*
Keywords||missed-optimization
Ever confirmed|0 |1
Last reconfirmed||2020-07-14
--- Comment #1 from Richard Biener ---
Confirmed. The issue seems to be PRE removing the RTL if-conversion
opportunity by eliding the final bitwise OR on the path with a literal zero:
_2 = MEM[(const uint8_t *)b_10(D) + 1B];
if (_2 != 0)
-goto ; [50.00%]
- else
goto ; [50.00%]
+ else
+goto ; [50.00%]
- [local count: 536870913]:
+ [local count: 536870912]:
+ _19 = iftmp.3_7 | 4;
[local count: 1073741824]:
- # iftmp.4_8 = PHI <4(4), 0(5)>
- _3 = iftmp.3_7 | iftmp.4_8;
- _4 = _3 * 4;
+ # iftmp.4_8 = PHI <4(5), 0(4)>
+ # prephitmp_20 = PHI <_19(5), iftmp.3_7(4)>
+ _4 = prephitmp_20 * 4;
_5 = 4837447714461450240 >> _4;
_6 = (int) _5;
len_11 = _6 & 15;
in the get_length4 case this pattern doesn't occur since the branch has
been removed by early folding and/or gimplification already.