Skip to content

Commit fb5c49f

Browse files
committed
implement feedback
1 parent f0c0ae2 commit fb5c49f

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
@@ -3077,12 +3077,13 @@ bool IRTranslator::translateCallBr(const User &U,
30773077
const CallBrInst &I = cast<CallBrInst>(U);
30783078
MachineBasicBlock *CallBrMBB = &MIRBuilder.getMBB();
30793079

3080-
// FIXME: inline asm is not yet supported for callbr in GlobalISel. As soon as
3081-
// we add support, we need to handle the indirect asm targets, see
3082-
// SelectionDAGBuilder::visitCallBr().
30833080
Intrinsic::ID IID = I.getIntrinsicID();
3084-
if (I.isInlineAsm())
3081+
if (I.isInlineAsm()) {
3082+
// FIXME: inline asm is not yet supported for callbr in GlobalISel. As soon
3083+
// as we add support, we need to handle the indirect asm targets, see
3084+
// SelectionDAGBuilder::visitCallBr().
30853085
return false;
3086+
}
30863087
if (!translateIntrinsic(I, IID, MIRBuilder))
30873088
return false;
30883089

llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3536,6 +3536,8 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) {
35363536
{LLVMContext::OB_deopt, LLVMContext::OB_funclet});
35373537
visitInlineAsm(I);
35383538
} else {
3539+
assert(!I.hasOperandBundles() &&
3540+
"Can't have operand bundles for intrinsics");
35393541
visitCallBrIntrinsic(I);
35403542
}
35413543
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)