summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorTim Northover <tnorthover@apple.com>2016-10-10 21:49:49 +0000
committerTim Northover <tnorthover@apple.com>2016-10-10 21:49:49 +0000
commit2fda4b08ae9d44c085f25da37bd2a2fcb91a6202 (patch)
treed8f560a3ce6f3303f13119de80b886bf73522586 /llvm/lib
parent4edc60d7855ae7bc3d07531b12e442ba1c6b683d (diff)
downloadbcm5719-llvm-2fda4b08ae9d44c085f25da37bd2a2fcb91a6202.tar.gz
bcm5719-llvm-2fda4b08ae9d44c085f25da37bd2a2fcb91a6202.zip
GlobalISel: support selecting G_GEP instructions.
They're basically just an alias for G_ADD on AArch64. llvm-svn: 283807
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
index addf60a102d..628e1708684 100644
--- a/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
+++ b/llvm/lib/Target/AArch64/AArch64InstructionSelector.cpp
@@ -130,6 +130,7 @@ static unsigned selectBinaryOp(unsigned GenericOpc, unsigned RegBankID,
case TargetOpcode::G_AND:
return AArch64::ANDXrr;
case TargetOpcode::G_ADD:
+ case TargetOpcode::G_GEP:
return AArch64::ADDXrr;
case TargetOpcode::G_SUB:
return AArch64::SUBXrr;
@@ -340,7 +341,8 @@ bool AArch64InstructionSelector::select(MachineInstr &I) const {
case TargetOpcode::G_SDIV:
case TargetOpcode::G_UDIV:
case TargetOpcode::G_ADD:
- case TargetOpcode::G_SUB: {
+ case TargetOpcode::G_SUB:
+ case TargetOpcode::G_GEP: {
// Reject the various things we don't support yet.
if (unsupportedBinOp(I, RBI, MRI, TRI))
return false;
OpenPOWER on IntegriCloud