if C1 and C3 are pow2 and Log2(C3) >= C2:
((C1 >> X) << C2) & C3 -> X == (Log2(C1)+C2-Log2(C3)) ? C3 : 0
Differential D127469
[InstCombine] Optimize lshr+shl+and conversion pattern bcl5980 on Jun 9 2022, 8:09 PM. Authored by
Details if C1 and C3 are pow2 and Log2(C3) >= C2: ((C1 >> X) << C2) & C3 -> X == (Log2(C1)+C2-Log2(C3)) ? C3 : 0
Diff Detail Event TimelineComment Actions I don't like increasing risk by combining what are really 2 independent changes into 1 patch. |