[llvm] r372467 - [AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>
Amara Emerson via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 21 02:21:17 PDT 2019
Author: aemerson
Date: Sat Sep 21 02:21:16 2019
New Revision: 372467
URL: http://llvm.org/viewvc/llvm-project?rev=372467&view=rev
Log:
[AArch64][GlobalISel] Implement selection for G_SHL of <2 x i64>
Simple continuation of existing selection support.
Modified:
llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp
llvm/trunk/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir
Modified: llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp?rev=372467&r1=372466&r2=372467&view=diff
==============================================================================
--- llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp (original)
+++ llvm/trunk/lib/Target/AArch64/AArch64InstructionSelector.cpp Sat Sep 21 02:21:16 2019
@@ -1018,7 +1018,9 @@ bool AArch64InstructionSelector::selectV
return false;
unsigned Opc = 0;
- if (Ty == LLT::vector(4, 32)) {
+ if (Ty == LLT::vector(2, 64)) {
+ Opc = AArch64::USHLv2i64;
+ } else if (Ty == LLT::vector(4, 32)) {
Opc = AArch64::USHLv4i32;
} else if (Ty == LLT::vector(2, 32)) {
Opc = AArch64::USHLv2i32;
Modified: llvm/trunk/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir?rev=372467&r1=372466&r2=372467&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir (original)
+++ llvm/trunk/test/CodeGen/AArch64/GlobalISel/select-vector-shift.mir Sat Sep 21 02:21:16 2019
@@ -59,6 +59,35 @@ body: |
...
---
+name: shl_v2i64
+alignment: 4
+legalized: true
+regBankSelected: true
+tracksRegLiveness: true
+registers:
+ - { id: 0, class: fpr }
+ - { id: 1, class: fpr }
+ - { id: 2, class: fpr }
+machineFunctionInfo: {}
+body: |
+ bb.1:
+ liveins: $q0, $q1
+
+ ; CHECK-LABEL: name: shl_v2i64
+ ; CHECK: liveins: $q0, $q1
+ ; CHECK: [[COPY:%[0-9]+]]:fpr128 = COPY $q0
+ ; CHECK: [[COPY1:%[0-9]+]]:fpr128 = COPY $q1
+ ; CHECK: [[USHLv2i64_:%[0-9]+]]:fpr128 = USHLv2i64 [[COPY]], [[COPY1]]
+ ; CHECK: $q0 = COPY [[USHLv2i64_]]
+ ; CHECK: RET_ReallyLR implicit $q0
+ %0:fpr(<2 x s64>) = COPY $q0
+ %1:fpr(<2 x s64>) = COPY $q1
+ %2:fpr(<2 x s64>) = G_SHL %0, %1(<2 x s64>)
+ $q0 = COPY %2(<2 x s64>)
+ RET_ReallyLR implicit $q0
+
+...
+---
name: ashr_v2i32
alignment: 4
legalized: true
More information about the llvm-commits
mailing list