[Bug tree-optimization/109048] [13 regression] redundant mask compare generated by vectorizer.
crazylht at gmail dot com
gcc-bugzilla@gcc.gnu.org
Tue Mar 7 06:22:06 GMT 2023
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=109048
--- Comment #3 from Hongtao.liu <crazylht at gmail dot com> ---
A three-operand phi make ifcvt generate worse code
<bb 4> [local count: 10737414]:
# iftmp.1_16 = PHI <2.5e-1(13), 5.0e-1(2)>
# iftmp.0_34 = PHI <4.0e+0(13), 2.0e+0(2)>
# prephitmp_40 = PHI <-2.5e-1(13), -5.0e-1(2)>
# prephitmp_41 = PHI <1.25e+0(13), 1.5e+0(2)>
# prephitmp_42 = PHI <-1.25e+0(13), -1.5e+0(2)>
# DEBUG f1 => NULL
# DEBUG f2 => iftmp.1_16
# DEBUG BEGIN_STMT
# DEBUG i => 0
# DEBUG BEGIN_STMT
if (_3 != 0)
goto <bb 28>; [50.00%]
else
goto <bb 29>; [50.00%]
<bb 29> [local count: 5368707]:
<bb 17> [local count: 531502204]:
# i_18 = PHI <0(29), i_47(26)>
# ivtmp_15 = PHI <256(29), ivtmp_43(26)>
# DEBUG i => i_18
# DEBUG BEGIN_STMT
_38 = (long unsigned int) i_18;
_37 = _38 * 4;
_36 = af_24(D) + _37;
x_20 = *_36;
# DEBUG x => x_20
# DEBUG BEGIN_STMT
# DEBUG D#1 => x_20 < 0.0
# DEBUG z => (int) D#1
# DEBUG BEGIN_STMT
if (x_20 >= 0.0)
goto <bb 19>; [59.00%]
else
goto <bb 22>; [41.00%]
<bb 19> [local count: 313586303]:
if (x_20 < iftmp.0_34)
goto <bb 22>; [20.00%]
else
goto <bb 21>; [80.00%]
<bb 21> [local count: 250869041]:
<bb 22> [local count: 531502205]:
# prephitmp_17 = PHI <2.0e+0(17), prephitmp_41(19), iftmp.1_16(21)>
# DEBUG t1 => D#2
# DEBUG BEGIN_STMT
# DEBUG neg_t1 => -D#2
# DEBUG BEGIN_STMT
# DEBUG t2 => prephitmp_17
# DEBUG BEGIN_STMT
_12 = res_28(D) + _37;
_26 = *_12;
_27 = _26 + x_20;
_45 = prephitmp_17 + _27;
*_12 = _45;
# DEBUG BEGIN_STMT
i_47 = i_18 + 1;
# DEBUG i => i_47
# DEBUG BEGIN_STMT
ivtmp_43 = ivtmp_15 - 1;
if (ivtmp_43 != 0)
More information about the Gcc-bugs
mailing list