[llvm] r287344 - GlobalISel: Fix unconditional fallback with global isel abort is disabled
Tom Stellard via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 18 06:14:35 PST 2016
Author: tstellar
Date: Fri Nov 18 08:14:35 2016
New Revision: 287344
URL: http://llvm.org/viewvc/llvm-project?rev=287344&view=rev
Log:
GlobalISel: Fix unconditional fallback with global isel abort is disabled
Reviewers: t.p.northover, ab, qcolombet
Subscribers: mehdi_amini, vkalintiris, wdng, dberris, llvm-commits, rovka
Differential Revision: https://reviews.llvm.org/D26765
Added:
llvm/trunk/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll
Modified:
llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
Modified: llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp?rev=287344&r1=287343&r2=287344&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp (original)
+++ llvm/trunk/lib/CodeGen/GlobalISel/InstructionSelect.cpp Fri Nov 18 08:14:35 2016
@@ -164,7 +164,7 @@ bool InstructionSelect::runOnMachineFunc
MRI.getVRegToType().clear();
- if (!TPC.isGlobalISelAbortEnabled() && (Failed || MF.size() == NumBlocks)) {
+ if (!TPC.isGlobalISelAbortEnabled() && (Failed || MF.size() != NumBlocks)) {
MF.getProperties().set(MachineFunctionProperties::Property::FailedISel);
return false;
}
Added: llvm/trunk/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll?rev=287344&view=auto
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll (added)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/gisel-abort.ll Fri Nov 18 08:14:35 2016
@@ -0,0 +1,8 @@
+; RUN: llc -march aarch64 -global-isel -global-isel-abort=2 -verify-machineinstrs %s -o - 2>&1 | FileCheck %s
+
+; CHECK-NOT: fallback
+; CHECK: empty
+define void @empty() {
+ ret void
+}
+
More information about the llvm-commits
mailing list