Skip to content

Commit 01ee03c

Browse files
committed
[CoroElide] Avoid AA query on non-pointers (NFCI)
1 parent 14dee0a commit 01ee03c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llvm/lib/Transforms/Coroutines/CoroElide.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ static void replaceWithConstant(Constant *Value,
104104
// See if any operand of the call instruction references the coroutine frame.
105105
static bool operandReferences(CallInst *CI, AllocaInst *Frame, AAResults &AA) {
106106
for (Value *Op : CI->operand_values())
107-
if (!AA.isNoAlias(Op, Frame))
107+
if (Op->getType()->isPointerTy() && !AA.isNoAlias(Op, Frame))
108108
return true;
109109
return false;
110110
}

0 commit comments

Comments
 (0)