Skip to content

Commit 5a7e2c3

Browse files
committed
Move intrinsic ID check to loop
1 parent 6a07812 commit 5a7e2c3

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

llvm/lib/CodeGen/ReplaceWithVeclib.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,6 @@ static bool replaceWithCallToVeclib(const TargetLibraryInfo &TLI,
101101
IntrinsicInst *II) {
102102
assert(II != nullptr && "Intrinsic cannot be null");
103103
Intrinsic::ID IID = II->getIntrinsicID();
104-
if (IID == Intrinsic::not_intrinsic)
105-
return false;
106104
Type *RetTy = II->getType();
107105
Type *ScalarRetTy = RetTy->getScalarType();
108106
// At the moment VFABI assumes the return type is always widened unless it is
@@ -208,6 +206,8 @@ static bool runImpl(const TargetLibraryInfo &TLI, Function &F) {
208206
for (auto &I : instructions(F)) {
209207
// Process only intrinsic calls that return void or a vector.
210208
if (auto *II = dyn_cast<IntrinsicInst>(&I)) {
209+
if (II->getIntrinsicID() == Intrinsic::not_intrinsic)
210+
continue;
211211
if (!II->getType()->isVectorTy() && !II->getType()->isVoidTy())
212212
continue;
213213

0 commit comments

Comments
 (0)