@@ -199,25 +199,6 @@ static Value *LowerCTLZ(LLVMContext &Context, Value *V, Instruction *IP) {
199199 return LowerCTPOP (Context, V, IP);
200200}
201201
202- // / Emit the code to lower clmul of V1, V2 before the specified instruction IP.
203- static Value *LowerCLMUL (LLVMContext &Context, Value *V1, Value *V2, Instruction *IP) {
204-
205- IRBuilder<> Builder (IP);
206-
207- unsigned BitSize = V1->getType ()->getScalarSizeInBits ();
208- Value *Res = ConstantInt::get (V1->getType (), 0 );
209- Value *Zero = ConstantInt::get (V1->getType (), 0 );
210- Value *One = ConstantInt::get (V1->getType (), 1 );
211- for (unsigned I = 1 ; I < BitSize; I++) {
212- Value *LowBit = Builder.CreateAnd (V1, One, " clmul.isodd" );
213- Value *Pred = Builder.CreateSelect (LowBit, V2, Zero, " clmul.V2_or_zero" );
214- Res = Builder.CreateXor (Res, Pred, " clmul.Res" );
215- V1 = Builder.CreateLShr (V1, One, " clmul.V1" );
216- V2 = Builder.CreateShl (V2, One, " clmul.V2" );
217- }
218- return Res;
219- }
220-
221202static void ReplaceFPIntrinsicWithCall (CallInst *CI, const char *Fname,
222203 const char *Dname,
223204 const char *LDname) {
@@ -281,10 +262,6 @@ void IntrinsicLowering::LowerIntrinsicCall(CallInst *CI) {
281262 CI->replaceAllUsesWith (LowerCTLZ (Context, CI->getArgOperand (0 ), CI));
282263 break ;
283264
284- case Intrinsic::clmul:
285- CI->replaceAllUsesWith (LowerCLMUL (Context, CI->getArgOperand (0 ), CI->getArgOperand (1 ), CI));
286- break ;
287-
288265 case Intrinsic::cttz: {
289266 // cttz(x) -> ctpop(~X & (X-1))
290267 Value *Src = CI->getArgOperand (0 );
0 commit comments