Skip to content

Commit 4d6752e

Browse files
committed
relax checks a bit
1 parent b8ce696 commit 4d6752e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/lib/Transforms/Utils/Local.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4227,8 +4227,7 @@ bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) {
42274227
// swifterror pointers can only be used by a load, store, or as a swifterror
42284228
// argument; swifterror pointers are not allowed to be used in select or phi
42294229
// instructions.
4230-
if ((OpIdx == 1 && isa<StoreInst>(I)) || (OpIdx == 0 && isa<LoadInst>(I)) ||
4231-
(OpIdx < I->getNumOperands() && isa<CallBase>(I)))
4230+
if (OpIdx < I->getNumOperands())
42324231
if (I->getOperand(OpIdx)->isSwiftError())
42334232
return false;
42344233

0 commit comments

Comments
 (0)