summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstSimplify/shift.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstSimplify/shift.ll')
-rw-r--r--llvm/test/Transforms/InstSimplify/shift.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/llvm/test/Transforms/InstSimplify/shift.ll b/llvm/test/Transforms/InstSimplify/shift.ll
index 770b7a8fa55..87b3e8227c2 100644
--- a/llvm/test/Transforms/InstSimplify/shift.ll
+++ b/llvm/test/Transforms/InstSimplify/shift.ll
@@ -17,6 +17,15 @@ define i41 @shl_0(i41 %X) {
ret i41 %B
}
+define <2 x i41> @shl_0_vec_undef_elt(<2 x i41> %X) {
+; CHECK-LABEL: @shl_0_vec_undef_elt(
+; CHECK-NEXT: [[B:%.*]] = shl <2 x i41> <i41 0, i41 undef>, [[X:%.*]]
+; CHECK-NEXT: ret <2 x i41> [[B]]
+;
+ %B = shl <2 x i41> <i41 0, i41 undef>, %X
+ ret <2 x i41> %B
+}
+
define i41 @ashr_by_0(i41 %A) {
; CHECK-LABEL: @ashr_by_0(
; CHECK-NEXT: ret i41 [[A:%.*]]
@@ -33,6 +42,15 @@ define i39 @ashr_0(i39 %X) {
ret i39 %B
}
+define <2 x i141> @ashr_0_vec_undef_elt(<2 x i141> %X) {
+; CHECK-LABEL: @ashr_0_vec_undef_elt(
+; CHECK-NEXT: [[B:%.*]] = shl <2 x i141> <i141 undef, i141 0>, [[X:%.*]]
+; CHECK-NEXT: ret <2 x i141> [[B]]
+;
+ %B = shl <2 x i141> <i141 undef, i141 0>, %X
+ ret <2 x i141> %B
+}
+
define i55 @lshr_by_bitwidth(i55 %A) {
; CHECK-LABEL: @lshr_by_bitwidth(
; CHECK-NEXT: ret i55 undef
OpenPOWER on IntegriCloud