summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorAmara Emerson <aemerson@apple.com>2019-06-06 07:33:47 +0000
committerAmara Emerson <aemerson@apple.com>2019-06-06 07:33:47 +0000
commitd940e20051baf8b913e72a6f2e2c045f05c230d5 (patch)
tree547f11cabd2f8cd780d1385844b2b70a4ed887f3 /llvm/lib
parentc1867557d93d622f761b57af6e66e3e518bc0b9f (diff)
downloadbcm5719-llvm-d940e20051baf8b913e72a6f2e2c045f05c230d5.tar.gz
bcm5719-llvm-d940e20051baf8b913e72a6f2e2c045f05c230d5.zip
[AArch64][GlobalISel] Add the new changes to fix PR42129 that were supposed to go into r362666.
The changes weren't staged so ended up just re-commiting the unmodified reverted change. llvm-svn: 362677
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
index c9af8fa1d65..288ef2abed2 100644
--- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
@@ -2854,6 +2854,11 @@ bool AArch64InstructionSelector::tryOptSelect(MachineInstr &I) const {
if (Opc != TargetOpcode::COPY && Opc != TargetOpcode::G_TRUNC)
break;
+ // Can't see past copies from physregs.
+ if (Opc == TargetOpcode::COPY &&
+ TargetRegisterInfo::isPhysicalRegister(CondDef->getOperand(1).getReg()))
+ return false;
+
CondDef = MRI.getVRegDef(CondDef->getOperand(1).getReg());
}
OpenPOWER on IntegriCloud