Skip to content

Commit b1fd235

Browse files
Simplify instruction removal when active lanes are unused.
1 parent bc257e7 commit b1fd235

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

llvm/lib/Target/AArch64/AArch64TargetTransformInfo.cpp

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1471,13 +1471,9 @@ simplifySVEIntrinsic(InstCombiner &IC, IntrinsicInst &II,
14711471
II, II.getOperand(IInfo.getOperandIdxInactiveLanesTakenFrom()));
14721472

14731473
if (IInfo.inactiveLanesAreUnused()) {
1474-
if (IInfo.resultIsZeroInitialized()) {
1474+
if (IInfo.resultIsZeroInitialized())
14751475
IC.replaceInstUsesWith(II, Constant::getNullValue(II.getType()));
1476-
// Ensure intrinsics with side effects (e.g. ld1ff) are removed.
1477-
return IC.eraseInstFromFunction(II);
1478-
}
14791476

1480-
assert(II.getType()->isVoidTy() && "Unexpected result type!");
14811477
return IC.eraseInstFromFunction(II);
14821478
}
14831479
}

0 commit comments

Comments
 (0)