forked from OSchip/llvm-project
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:
parent
db6ca05a6b
commit
4aa73a649a
|
@ -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;
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue