summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-09-02 22:33:57 +0000
committerJuergen Ributzka <juergen@apple.com>2014-09-02 22:33:57 +0000
commit53dbef6ef14378467a3439288e42e4b1d3027ec5 (patch)
tree50f571207ccda1d4ab6816471c69c687d2dcb5e2 /llvm/lib
parent8a4b8bebdc4d3baed2bcc431951d3cf013a48087 (diff)
downloadbcm5719-llvm-53dbef6ef14378467a3439288e42e4b1d3027ec5.tar.gz
bcm5719-llvm-53dbef6ef14378467a3439288e42e4b1d3027ec5.zip
[FastISel][AArch64] Use the target-dependent selection code for shifts first.
This uses the target-dependent selection code for shifts first, which allows us to create better code for shifts with immediates and sign-/zero-extend folding. Vector type are not handled yet and the code falls back to target-independent instruction selection for these cases. This fixes rdar://problem/17907920. llvm-svn: 216985
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/AArch64/AArch64FastISel.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/llvm/lib/Target/AArch64/AArch64FastISel.cpp b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
index 280d11af470..75163807565 100644
--- a/llvm/lib/Target/AArch64/AArch64FastISel.cpp
+++ b/llvm/lib/Target/AArch64/AArch64FastISel.cpp
@@ -3475,16 +3475,16 @@ bool AArch64FastISel::TargetSelectInstruction(const Instruction *I) {
case Instruction::FRem:
return SelectBinaryOp(I, ISD::FREM);
case Instruction::Shl:
- if (!SelectBinaryOp(I, ISD::SHL))
- return SelectShift(I);
+ if (!SelectShift(I))
+ return SelectBinaryOp(I, ISD::SHL);
return true;
case Instruction::LShr:
- if (!SelectBinaryOp(I, ISD::SRL))
- return SelectShift(I);
+ if (!SelectShift(I))
+ return SelectBinaryOp(I, ISD::SRL);
return true;
case Instruction::AShr:
- if (!SelectBinaryOp(I, ISD::SRA))
- return SelectShift(I);
+ if (!SelectShift(I))
+ return SelectBinaryOp(I, ISD::SRA);
return true;
case Instruction::And:
return SelectBinaryOp(I, ISD::AND);
OpenPOWER on IntegriCloud