Skip to content

Commit dcd733d

Browse files
committed
implement feedback
1 parent 5d37896 commit dcd733d

File tree

3 files changed

+8
-5
lines changed

3 files changed

+8
-5
lines changed

llvm/lib/CodeGen/GlobalISel/IRTranslator.cpp

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3066,12 +3066,13 @@ bool IRTranslator::translateCallBr(const User &U,
30663066
const CallBrInst &I = cast<CallBrInst>(U);
30673067
MachineBasicBlock *CallBrMBB = &MIRBuilder.getMBB();
30683068

3069-
// FIXME: inline asm is not yet supported for callbr in GlobalISel. As soon as
3070-
// we add support, we need to handle the indirect asm targets, see
3071-
// SelectionDAGBuilder::visitCallBr().
30723069
Intrinsic::ID IID = I.getIntrinsicID();
3073-
if (I.isInlineAsm())
3070+
if (I.isInlineAsm()) {
3071+
// FIXME: inline asm is not yet supported for callbr in GlobalISel. As soon
3072+
// as we add support, we need to handle the indirect asm targets, see
3073+
// SelectionDAGBuilder::visitCallBr().
30743074
return false;
3075+
}
30753076
if (!translateIntrinsic(I, IID, MIRBuilder))
30763077
return false;
30773078

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3538,6 +3538,8 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
35383538
{LLVMContext::OB_deopt, LLVMContext::OB_funclet});
35393539
visitInlineAsm(I);
35403540
} else {
3541+
assert(!I.hasOperandBundles() &&
3542+
"Can't have operand bundles for intrinsics");
35413543
visitCallBrIntrinsic(I);
35423544
}
35433545
CopyToExportRegsIfNeeded(&I);

llvm/test/Verifier/callbr-intrinsic.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
; RUN: not opt -S %s -passes=verify 2>&1 | FileCheck %s
1+
; RUN: not opt -S %s 2>&1 | FileCheck %s
22

33
declare void @llvm.amdgcn.kill(i1)
44

0 commit comments

Comments
 (0)