Fix the failure caused by r322773

Do not run GlobalISel if `-fast-isel=0 -global-isel=false`.

llvm-svn: 322800
This commit is contained in:
Volkan Keles 2018-01-18 01:10:30 +00:00
parent db6ca05a6b
commit 4aa73a649a
2 changed files with 6 additions and 8 deletions

View File

@ -711,16 +711,11 @@ bool TargetPassConfig::addCoreISelPasses() {
TM->setFastISel(true);
// Ask the target for an instruction selector.
bool EnableGlobalISel = TM->Options.EnableGlobalISel;
// Explicitly enabling fast-isel should override implicitly enabled
// global-isel.
if (EnableGlobalISel && (EnableGlobalISelOption == cl::BOU_UNSET) &&
(EnableFastISelOption == cl::BOU_TRUE))
EnableGlobalISel = false;
if (EnableGlobalISelOption == cl::BOU_TRUE)
EnableGlobalISel = true;
if (EnableGlobalISel) {
if (EnableGlobalISelOption == cl::BOU_TRUE ||
(EnableGlobalISelOption == cl::BOU_UNSET &&
TM->Options.EnableGlobalISel && EnableFastISelOption != cl::BOU_TRUE)) {
if (addIRTranslator())
return true;

View File

@ -32,6 +32,9 @@
; RUN: llc -mtriple=aarch64-- -debug-pass=Structure %s -o /dev/null 2>&1 \
; RUN: | FileCheck %s --check-prefix DISABLED
; RUN: llc -mtriple=aarch64-- -fast-isel=0 -global-isel=false \
; RUN: -debug-pass=Structure %s -o /dev/null 2>&1 | FileCheck %s --check-prefix DISABLED
; ENABLED: IRTranslator
; ENABLED-NEXT: Legalizer
; ENABLED-NEXT: RegBankSelect