Skip to content

Commit e13c141

Browse files
committed
[SelectionDAGBuilder] Use CallBase::isInlineAsm in a couple places. NFC
These lines were just changed from using CallBase::getCalledValue to getCallledOperand. Go aheand change them to isInlineAsm.
1 parent a58b62b commit e13c141

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static void diagnosePossiblyInvalidConstraint(LLVMContext &Ctx, const Value *V,
346346

347347
const char *AsmError = ", possible invalid constraint for vector type";
348348
if (const CallInst *CI = dyn_cast<CallInst>(I))
349-
if (isa<InlineAsm>(CI->getCalledOperand()))
349+
if (CI->isInlineAsm())
350350
return Ctx.emitError(I, ErrMsg + AsmError);
351351

352352
return Ctx.emitError(I, ErrMsg);
@@ -2856,8 +2856,7 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
28562856
{LLVMContext::OB_deopt, LLVMContext::OB_funclet}) &&
28572857
"Cannot lower callbrs with arbitrary operand bundles yet!");
28582858

2859-
assert(isa<InlineAsm>(I.getCalledOperand()) &&
2860-
"Only know how to handle inlineasm callbr");
2859+
assert(I.isInlineAsm() && "Only know how to handle inlineasm callbr");
28612860
visitInlineAsm(I);
28622861
CopyToExportRegsIfNeeded(&I);
28632862

0 commit comments

Comments
 (0)