Skip to content

Commit 4bf8985

Browse files
committed
Replace calls to IntrinsicInst::Create with CallInst::Create [nfc]
There is no IntrinsicInst::Create. These are binding to the method in the super type. Be explicitly about which method is being called.
1 parent 908215b commit 4bf8985

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2110,7 +2110,7 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) {
21102110

21112111
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
21122112
Function *F = Intrinsic::getDeclaration(Or.getModule(), IID, Or.getType());
2113-
return IntrinsicInst::Create(F, {ShVal0, ShVal1, ShAmt});
2113+
return CallInst::Create(F, {ShVal0, ShVal1, ShAmt});
21142114
}
21152115

21162116
/// Attempt to combine or(zext(x),shl(zext(y),bw/2) concat packing patterns.

llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -608,7 +608,7 @@ Instruction *InstCombinerImpl::narrowFunnelShift(TruncInst &Trunc) {
608608
Y = Builder.CreateTrunc(ShVal1, DestTy);
609609
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
610610
Function *F = Intrinsic::getDeclaration(Trunc.getModule(), IID, DestTy);
611-
return IntrinsicInst::Create(F, {X, Y, NarrowShAmt});
611+
return CallInst::Create(F, {X, Y, NarrowShAmt});
612612
}
613613

614614
/// Try to narrow the width of math or bitwise logic instructions by pulling a
@@ -2702,7 +2702,7 @@ Instruction *InstCombinerImpl::visitBitCast(BitCastInst &CI) {
27022702
Function *Bswap =
27032703
Intrinsic::getDeclaration(CI.getModule(), Intrinsic::bswap, DestTy);
27042704
Value *ScalarX = Builder.CreateBitCast(ShufOp0, DestTy);
2705-
return IntrinsicInst::Create(Bswap, { ScalarX });
2705+
return CallInst::Create(Bswap, { ScalarX });
27062706
}
27072707
}
27082708

llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2383,7 +2383,7 @@ static Instruction *foldSelectFunnelShift(SelectInst &Sel,
23832383
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
23842384
Function *F = Intrinsic::getDeclaration(Sel.getModule(), IID, Sel.getType());
23852385
ShAmt = Builder.CreateZExt(ShAmt, Sel.getType());
2386-
return IntrinsicInst::Create(F, { SV0, SV1, ShAmt });
2386+
return CallInst::Create(F, { SV0, SV1, ShAmt });
23872387
}
23882388

23892389
static Instruction *foldSelectToCopysign(SelectInst &Sel,
@@ -2424,7 +2424,7 @@ static Instruction *foldSelectToCopysign(SelectInst &Sel,
24242424
Value *MagArg = TC->isNegative() ? FVal : TVal;
24252425
Function *F = Intrinsic::getDeclaration(Sel.getModule(), Intrinsic::copysign,
24262426
Sel.getType());
2427-
Instruction *CopySign = IntrinsicInst::Create(F, { MagArg, X });
2427+
Instruction *CopySign = CallInst::Create(F, { MagArg, X });
24282428
CopySign->setFastMathFlags(Sel.getFastMathFlags());
24292429
return CopySign;
24302430
}

0 commit comments

Comments
 (0)