[llvm] 4bf8985 - Replace calls to IntrinsicInst::Create with CallInst::Create [nfc]
Philip Reames via llvm-commits
llvm-commits at lists.llvm.org
Tue Apr 6 13:25:12 PDT 2021
Author: Philip Reames
Date: 2021-04-06T13:23:58-07:00
New Revision: 4bf8985f4fb1411831505a4b38265eb517783dc7
URL: https://github.com/llvm/llvm-project/commit/4bf8985f4fb1411831505a4b38265eb517783dc7
DIFF: https://github.com/llvm/llvm-project/commit/4bf8985f4fb1411831505a4b38265eb517783dc7.diff
LOG: 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.
Added:
Modified:
llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
index 5e7abebe48a7..1de3b87d4a29 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
@@ -2110,7 +2110,7 @@ static Instruction *matchFunnelShift(Instruction &Or, InstCombinerImpl &IC) {
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
Function *F = Intrinsic::getDeclaration(Or.getModule(), IID, Or.getType());
- return IntrinsicInst::Create(F, {ShVal0, ShVal1, ShAmt});
+ return CallInst::Create(F, {ShVal0, ShVal1, ShAmt});
}
/// Attempt to combine or(zext(x),shl(zext(y),bw/2) concat packing patterns.
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index d24428e05ebf..71e4ccd104f2 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -608,7 +608,7 @@ Instruction *InstCombinerImpl::narrowFunnelShift(TruncInst &Trunc) {
Y = Builder.CreateTrunc(ShVal1, DestTy);
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
Function *F = Intrinsic::getDeclaration(Trunc.getModule(), IID, DestTy);
- return IntrinsicInst::Create(F, {X, Y, NarrowShAmt});
+ return CallInst::Create(F, {X, Y, NarrowShAmt});
}
/// Try to narrow the width of math or bitwise logic instructions by pulling a
@@ -2702,7 +2702,7 @@ Instruction *InstCombinerImpl::visitBitCast(BitCastInst &CI) {
Function *Bswap =
Intrinsic::getDeclaration(CI.getModule(), Intrinsic::bswap, DestTy);
Value *ScalarX = Builder.CreateBitCast(ShufOp0, DestTy);
- return IntrinsicInst::Create(Bswap, { ScalarX });
+ return CallInst::Create(Bswap, { ScalarX });
}
}
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
index a1fa8b748a90..854e2bf97d6a 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineSelect.cpp
@@ -2383,7 +2383,7 @@ static Instruction *foldSelectFunnelShift(SelectInst &Sel,
Intrinsic::ID IID = IsFshl ? Intrinsic::fshl : Intrinsic::fshr;
Function *F = Intrinsic::getDeclaration(Sel.getModule(), IID, Sel.getType());
ShAmt = Builder.CreateZExt(ShAmt, Sel.getType());
- return IntrinsicInst::Create(F, { SV0, SV1, ShAmt });
+ return CallInst::Create(F, { SV0, SV1, ShAmt });
}
static Instruction *foldSelectToCopysign(SelectInst &Sel,
@@ -2424,7 +2424,7 @@ static Instruction *foldSelectToCopysign(SelectInst &Sel,
Value *MagArg = TC->isNegative() ? FVal : TVal;
Function *F = Intrinsic::getDeclaration(Sel.getModule(), Intrinsic::copysign,
Sel.getType());
- Instruction *CopySign = IntrinsicInst::Create(F, { MagArg, X });
+ Instruction *CopySign = CallInst::Create(F, { MagArg, X });
CopySign->setFastMathFlags(Sel.getFastMathFlags());
return CopySign;
}
More information about the llvm-commits
mailing list