Lines Matching refs:ShVal0
78 auto matchFunnelShift = [](Value *V, Value *&ShVal0, Value *&ShVal1,
82 // fshl(ShVal0, ShVal1, ShAmt)
83 // == (ShVal0 << ShAmt) | (ShVal1 >> (Width -ShAmt))
85 m_Shl(m_Value(ShVal0), m_Value(ShAmt)),
91 // fshr(ShVal0, ShVal1, ShAmt)
92 // == (ShVal0 >> ShAmt) | (ShVal1 << (Width - ShAmt))
94 m_OneUse(m_c_Or(m_Shl(m_Value(ShVal0), m_Sub(m_SpecificInt(Width),
106 // phi [ fshl(ShVal0, ShVal1, ShAmt), FunnelBB ], [ ShVal0, GuardBB ]
107 // phi [ fshr(ShVal0, ShVal1, ShAmt), FunnelBB ], [ ShVal1, GuardBB ]
111 Value *ShVal0, *ShVal1, *ShAmt;
112 Intrinsic::ID IID = matchFunnelShift(P0, ShVal0, ShVal1, ShAmt);
114 (IID == Intrinsic::fshl && ShVal0 != P1) ||
116 IID = matchFunnelShift(P1, ShVal0, ShVal1, ShAmt);
118 (IID == Intrinsic::fshl && ShVal0 != P0) ||
135 if (!DT.dominates(ShVal0, TermI) || !DT.dominates(ShVal1, TermI))
149 if (ShVal0 == ShVal1)
157 if (ShVal0 != ShVal1) {
160 else if (!IsFshl && !llvm::isGuaranteedNotToBePoison(ShVal0))
161 ShVal0 = Builder.CreateFreeze(ShVal0);
171 // %shl = shl i32 %ShVal0, %ShAmt
175 // %cond = phi i32 [ %fsh, %FunnelBB ], [ %ShVal0, %GuardBB ]
177 // llvm.fshl.i32(i32 %ShVal0, i32 %ShVal1, i32 %ShAmt)
179 Phi.replaceAllUsesWith(Builder.CreateCall(F, {ShVal0, ShVal1, ShAmt}));