[PATCH] D60182: [FastISel] Fix the crash in gc.result lowering
Serguei Katkov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 3 21:19:47 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rGfb44846e37c1: [FastISel] Fix the crash in gc.result lowering (authored by skatkov).
Herald added a subscriber: hiraditya.
Herald added a project: LLVM.
Changed prior to commit:
https://reviews.llvm.org/D60182?vs=193438&id=193656#toc
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60182/new/
https://reviews.llvm.org/D60182
Files:
llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
llvm/test/CodeGen/X86/fast-isel-gc-intrinsics.ll
Index: llvm/test/CodeGen/X86/fast-isel-gc-intrinsics.ll
===================================================================
--- llvm/test/CodeGen/X86/fast-isel-gc-intrinsics.ll
+++ llvm/test/CodeGen/X86/fast-isel-gc-intrinsics.ll
@@ -17,6 +17,8 @@
entry:
%safepoint_token = tail call token (i64, i32, i1 ()*, i32, i32, ...) @llvm.experimental.gc.statepoint.p0f_i1f(i64 0, i32 0, i1 ()* @return_i1, i32 0, i32 0, i32 0, i32 0)
%call1 = call zeroext i1 @llvm.experimental.gc.result.i1(token %safepoint_token)
+ br label %exit
+exit:
ret i1 %call1
}
Index: llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
===================================================================
--- llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
+++ llvm/lib/CodeGen/SelectionDAG/SelectionDAGISel.cpp
@@ -1721,7 +1721,8 @@
// to keep track of gc-relocates for a particular gc-statepoint. This is
// done by SelectionDAGBuilder::LowerAsSTATEPOINT, called before
// visitGCRelocate.
- if (isa<CallInst>(Inst) && !isStatepoint(Inst) && !isGCRelocate(Inst)) {
+ if (isa<CallInst>(Inst) && !isStatepoint(Inst) && !isGCRelocate(Inst) &&
+ !isGCResult(Inst)) {
OptimizationRemarkMissed R("sdagisel", "FastISelFailure",
Inst->getDebugLoc(), LLVMBB);
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D60182.193656.patch
Type: text/x-patch
Size: 1341 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190404/566b7213/attachment.bin>
More information about the llvm-commits
mailing list