diff options
author | Bill Wendling <morbo@google.com> | 2020-01-07 12:53:44 -0800 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2020-01-07 13:40:26 -0800 |
commit | 52366088a8e42c2f1e96e8430b84b8b65ec3f7bc (patch) | |
tree | e8a2e167aa496592c70af28529ba313de1642575 /llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | |
parent | 6652cc0cf7c0373b8af12f9e5b1a7065577a78da (diff) | |
download | bcm5719-llvm-52366088a8e42c2f1e96e8430b84b8b65ec3f7bc.tar.gz bcm5719-llvm-52366088a8e42c2f1e96e8430b84b8b65ec3f7bc.zip |
Allow output constraints on "asm goto"
Summary:
Remove the restrictions that preventing "asm goto" from returning non-void
values. The values returned by "asm goto" are only valid on the "fallthrough"
path.
Reviewers: jyknight, nickdesaulniers, hfinkel
Reviewed By: jyknight, nickdesaulniers
Subscribers: rsmith, hiraditya, llvm-commits, cfe-commits, craig.topper, rnk
Tags: #clang, #llvm
Differential Revision: https://reviews.llvm.org/D69876
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp index 00b05c5db2f..1505506dbf0 100644 --- a/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp @@ -2847,6 +2847,7 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { assert(isa<InlineAsm>(I.getCalledValue()) && "Only know how to handle inlineasm callbr"); visitInlineAsm(&I); + CopyToExportRegsIfNeeded(&I); // Retrieve successors. MachineBasicBlock *Return = FuncInfo.MBBMap[I.getDefaultDest()]; @@ -2856,6 +2857,7 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { for (unsigned i = 0, e = I.getNumIndirectDests(); i < e; ++i) { MachineBasicBlock *Target = FuncInfo.MBBMap[I.getIndirectDest(i)]; addSuccessorWithProb(CallBrMBB, Target); + Target->setIsInlineAsmBrIndirectPad(); } CallBrMBB->normalizeSuccProbs(); |