summaryrefslogtreecommitdiffstats
path: root/llvm/test/Transforms/InstCombine/trunc.ll
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/test/Transforms/InstCombine/trunc.ll')
-rw-r--r--llvm/test/Transforms/InstCombine/trunc.ll109
1 files changed, 0 insertions, 109 deletions
diff --git a/llvm/test/Transforms/InstCombine/trunc.ll b/llvm/test/Transforms/InstCombine/trunc.ll
index cfc014a3175..38f6b2804d6 100644
--- a/llvm/test/Transforms/InstCombine/trunc.ll
+++ b/llvm/test/Transforms/InstCombine/trunc.ll
@@ -160,112 +160,3 @@ define i32 @trunc_bitcast3(<4 x i32> %v) {
; CHECK-NEXT: ret i32 %ext
}
-
-; CHECK-LABEL: @trunc_shl_31_i32_i64(
-; CHECK: %val.tr = trunc i64 %val to i32
-; CHECK-NEXT: shl i32 %val.tr, 31
-define i32 @trunc_shl_31_i32_i64(i64 %val) {
- %shl = shl i64 %val, 31
- %trunc = trunc i64 %shl to i32
- ret i32 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_15_i16_i64(
-; CHECK: %val.tr = trunc i64 %val to i16
-; CHECK-NEXT: shl i16 %val.tr, 15
-define i16 @trunc_shl_15_i16_i64(i64 %val) {
- %shl = shl i64 %val, 15
- %trunc = trunc i64 %shl to i16
- ret i16 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_15_i16_i32(
-; CHECK: %val.tr = trunc i32 %val to i16
-; CHECK-NEXT: shl i16 %val.tr, 15
-define i16 @trunc_shl_15_i16_i32(i32 %val) {
- %shl = shl i32 %val, 15
- %trunc = trunc i32 %shl to i16
- ret i16 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_7_i8_i64(
-; CHECK: %val.tr = trunc i64 %val to i8
-; CHECK-NEXT: shl i8 %val.tr, 7
-define i8 @trunc_shl_7_i8_i64(i64 %val) {
- %shl = shl i64 %val, 7
- %trunc = trunc i64 %shl to i8
- ret i8 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_1_i2_i64(
-; CHECK: shl i64 %val, 1
-; CHECK-NEXT: trunc i64 %shl to i2
-define i2 @trunc_shl_1_i2_i64(i64 %val) {
- %shl = shl i64 %val, 1
- %trunc = trunc i64 %shl to i2
- ret i2 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_1_i32_i64(
-; CHECK: %val.tr = trunc i64 %val to i32
-; CHECK-NEXT: shl i32 %val.tr, 1
-define i32 @trunc_shl_1_i32_i64(i64 %val) {
- %shl = shl i64 %val, 1
- %trunc = trunc i64 %shl to i32
- ret i32 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_16_i32_i64(
-; CHECK: %val.tr = trunc i64 %val to i32
-; CHECK-NEXT: shl i32 %val.tr, 16
-define i32 @trunc_shl_16_i32_i64(i64 %val) {
- %shl = shl i64 %val, 16
- %trunc = trunc i64 %shl to i32
- ret i32 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_33_i32_i64(
-; CHECK: ret i32 0
-define i32 @trunc_shl_33_i32_i64(i64 %val) {
- %shl = shl i64 %val, 33
- %trunc = trunc i64 %shl to i32
- ret i32 %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_32_i32_i64(
-; CHECK: ret i32 0
-define i32 @trunc_shl_32_i32_i64(i64 %val) {
- %shl = shl i64 %val, 32
- %trunc = trunc i64 %shl to i32
- ret i32 %trunc
-}
-
-; TODO: Should be able to handle vectors
-; CHECK-LABEL: @trunc_shl_16_v2i32_v2i64(
-; CHECK: shl <2 x i64>
-define <2 x i32> @trunc_shl_16_v2i32_v2i64(<2 x i64> %val) {
- %shl = shl <2 x i64> %val, <i64 16, i64 16>
- %trunc = trunc <2 x i64> %shl to <2 x i32>
- ret <2 x i32> %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_nosplat_v2i32_v2i64(
-; CHECK: shl <2 x i64>
-define <2 x i32> @trunc_shl_nosplat_v2i32_v2i64(<2 x i64> %val) {
- %shl = shl <2 x i64> %val, <i64 15, i64 16>
- %trunc = trunc <2 x i64> %shl to <2 x i32>
- ret <2 x i32> %trunc
-}
-
-; CHECK-LABEL: @trunc_shl_31_i32_i64_multi_use(
-; CHECK: shl i64 %val, 31
-; CHECK-NOT: shl i32
-; CHECK: trunc i64 %shl to i32
-; CHECK-NOT: shl i32
-define void @trunc_shl_31_i32_i64_multi_use(i64 %val, i32 addrspace(1)* %ptr0, i64 addrspace(1)* %ptr1) {
- %shl = shl i64 %val, 31
- %trunc = trunc i64 %shl to i32
- store volatile i32 %trunc, i32 addrspace(1)* %ptr0
- store volatile i64 %shl, i64 addrspace(1)* %ptr1
- ret void
-}
OpenPOWER on IntegriCloud