[GlobalISel] Fix choice of instruction selector for AArch64 at -O0 with -global-isel=0
authorPetr Pavlu <petr.pavlu@arm.com>
Tue, 8 Jan 2019 14:19:06 +0000 (14:19 +0000)
committerPetr Pavlu <petr.pavlu@arm.com>
Tue, 8 Jan 2019 14:19:06 +0000 (14:19 +0000)
commitbf4fdecc5160205ce966044d59bc35a406de65e5
tree12e31850035d8fb6f56a9afe7e1eb131cdc5f34f
parent2e6dc538be1a694ad569496b917c5e653ed21c1d
[GlobalISel] Fix choice of instruction selector for AArch64 at -O0 with -global-isel=0

Commit rL347861 introduced an unintentional change in the behaviour when
compiling for AArch64 at -O0 with -global-isel=0. Previously, explicitly
disabling GlobalISel resulted in using FastISel but an updated condition
in the commit changed it to using SelectionDAG. The patch fixes this
condition and slightly better organizes the code that chooses the
instruction selector.

Fixes PR40131.

Differential Revision: https://reviews.llvm.org/D56266

llvm-svn: 350626
llvm/lib/CodeGen/TargetPassConfig.cpp
llvm/test/CodeGen/AArch64/GlobalISel/gisel-commandline-option-fastisel.ll [new file with mode: 0644]