summaryrefslogtreecommitdiffstats
path: root/llvm/test/CodeGen
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/CodeGen')
-rw-r--r--llvm/test/CodeGen/AArch64/fast-isel-shift.ll25
1 files changed, 24 insertions, 1 deletions
diff --git a/llvm/test/CodeGen/AArch64/fast-isel-shift.ll b/llvm/test/CodeGen/AArch64/fast-isel-shift.ll
index e4a3b860d2e..fd3ee27a4b6 100644
--- a/llvm/test/CodeGen/AArch64/fast-isel-shift.ll
+++ b/llvm/test/CodeGen/AArch64/fast-isel-shift.ll
@@ -1,4 +1,4 @@
-; RUN: llc -fast-isel -fast-isel-abort -mtriple=arm64-apple-darwin -verify-machineinstrs < %s | FileCheck %s
+; RUN: llc -fast-isel -fast-isel-abort -mtriple=aarch64-apple-darwin -verify-machineinstrs < %s | FileCheck %s
; CHECK-LABEL: lsl_zext_i1_i16
; CHECK: ubfiz {{w[0-9]*}}, {{w[0-9]*}}, #4, #1
@@ -404,3 +404,26 @@ define i32 @shift_test1(i8 %a) {
ret i32 %3
}
+; Test zero shifts
+
+; CHECK-LABEL: shl_zero
+; CHECK-NOT: lsl
+define i32 @shl_zero(i32 %a) {
+ %1 = shl i32 %a, 0
+ ret i32 %1
+}
+
+; CHECK-LABEL: lshr_zero
+; CHECK-NOT: lsr
+define i32 @lshr_zero(i32 %a) {
+ %1 = lshr i32 %a, 0
+ ret i32 %1
+}
+
+; CHECK-LABEL: ashr_zero
+; CHECK-NOT: asr
+define i32 @ashr_zero(i32 %a) {
+ %1 = ashr i32 %a, 0
+ ret i32 %1
+}
+
OpenPOWER on IntegriCloud