aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/InstCombine
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/InstCombine')
-rw-r--r--test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll4
-rw-r--r--test/Transforms/InstCombine/getelementptr.ll19
-rw-r--r--test/Transforms/InstCombine/phi.ll2
-rw-r--r--test/Transforms/InstCombine/vec_narrow.ll12
-rw-r--r--test/Transforms/InstCombine/vec_shuffle.ll29
5 files changed, 24 insertions, 42 deletions
diff --git a/test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll b/test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll
index e1549a0fe5..e6c9bcd01e 100644
--- a/test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll
+++ b/test/Transforms/InstCombine/2007-11-07-OpaqueAlignCrash.ll
@@ -5,8 +5,8 @@ target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f3
target triple = "i686-pc-linux-gnu"
%opaque_t = type opaque
-
-%op_ts = type {opaque, i32}
+%opaque2 = type opaque
+%op_ts = type {%opaque2, i32}
@g = external global %opaque_t
@h = external global %op_ts
diff --git a/test/Transforms/InstCombine/getelementptr.ll b/test/Transforms/InstCombine/getelementptr.ll
index b86939287f..aa2eba177b 100644
--- a/test/Transforms/InstCombine/getelementptr.ll
+++ b/test/Transforms/InstCombine/getelementptr.ll
@@ -40,7 +40,7 @@ define i32* @test4({ i32 }* %I) {
%B = getelementptr { i32 }* %A, i64 0, i32 0
ret i32* %B
; CHECK: @test4
-; CHECK: getelementptr %intstruct* %I, i64 1, i32 0
+; CHECK: getelementptr { i32 }* %I, i64 1, i32 0
}
define void @test5(i8 %B) {
@@ -86,7 +86,7 @@ define i1 @test10({ i32, i32 }* %x, { i32, i32 }* %y) {
%tmp.4 = icmp eq i32* %tmp.1, %tmp.3
ret i1 %tmp.4
; CHECK: @test10
-; CHECK: icmp eq %pair* %x, %y
+; CHECK: icmp eq { i32, i32 }* %x, %y
}
define i1 @test11({ i32, i32 }* %X) {
@@ -94,7 +94,7 @@ define i1 @test11({ i32, i32 }* %X) {
%Q = icmp eq i32* %P, null
ret i1 %Q
; CHECK: @test11
-; CHECK: icmp eq %pair* %X, null
+; CHECK: icmp eq { i32, i32 }* %X, null
}
@@ -228,19 +228,6 @@ define i1 @test23() {
; CHECK: ret i1 false
}
-%"java/lang/Object" = type { %struct.llvm_java_object_base }
-%"java/lang/StringBuffer" = type { %"java/lang/Object", i32, { %"java/lang/Object", i32, [0 x i16] }*, i1 }
-%struct.llvm_java_object_base = type opaque
-
-define void @test24() {
-bc0:
- %tmp53 = getelementptr %"java/lang/StringBuffer"* null, i32 0, i32 1 ; <i32*> [#uses=1]
- store i32 0, i32* %tmp53
- ret void
-; CHECK: @test24
-; CHECK: store i32 0, i32* getelementptr (%"java/lang/StringBuffer"* null, i64 0, i32 1)
-}
-
define void @test25() {
entry:
%tmp = getelementptr { i64, i64, i64, i64 }* null, i32 0, i32 3 ; <i64*> [#uses=1]
diff --git a/test/Transforms/InstCombine/phi.ll b/test/Transforms/InstCombine/phi.ll
index cd865ae81b..219545c2ea 100644
--- a/test/Transforms/InstCombine/phi.ll
+++ b/test/Transforms/InstCombine/phi.ll
@@ -139,7 +139,7 @@ BB2:
; CHECK: @test8
; CHECK-NOT: phi
; CHECK: BB2:
-; CHECK-NEXT: %B = getelementptr %0
+; CHECK-NEXT: %B = getelementptr { i32, i32 }* %A
; CHECK-NEXT: ret i32* %B
}
diff --git a/test/Transforms/InstCombine/vec_narrow.ll b/test/Transforms/InstCombine/vec_narrow.ll
index c05c802188..2be4359923 100644
--- a/test/Transforms/InstCombine/vec_narrow.ll
+++ b/test/Transforms/InstCombine/vec_narrow.ll
@@ -1,12 +1,10 @@
-; RUN: opt < %s -instcombine -S | \
-; RUN: grep {fadd float}
+; RUN: opt < %s -instcombine -S | grep {fadd float}
- %V = type <4 x float>
-define float @test(%V %A, %V %B, float %f) {
- %C = insertelement %V %A, float %f, i32 0 ; <%V> [#uses=1]
- %D = fadd %V %C, %B ; <%V> [#uses=1]
- %E = extractelement %V %D, i32 0 ; <float> [#uses=1]
+define float @test(<4 x float> %A, <4 x float> %B, float %f) {
+ %C = insertelement <4 x float> %A, float %f, i32 0 ; <%V> [#uses=1]
+ %D = fadd <4 x float> %C, %B ; <%V> [#uses=1]
+ %E = extractelement <4 x float> %D, i32 0 ; <float> [#uses=1]
ret float %E
}
diff --git a/test/Transforms/InstCombine/vec_shuffle.ll b/test/Transforms/InstCombine/vec_shuffle.ll
index bd36e9ecb1..896cb88176 100644
--- a/test/Transforms/InstCombine/vec_shuffle.ll
+++ b/test/Transforms/InstCombine/vec_shuffle.ll
@@ -1,28 +1,25 @@
; RUN: opt < %s -instcombine -S | FileCheck %s
-%T = type <4 x float>
-
-
-define %T @test1(%T %v1) {
+define <4 x float> @test1(<4 x float> %v1) {
; CHECK: @test1
-; CHECK: ret %T %v1
- %v2 = shufflevector %T %v1, %T undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
- ret %T %v2
+; CHECK: ret <4 x float> %v1
+ %v2 = shufflevector <4 x float> %v1, <4 x float> undef, <4 x i32> <i32 0, i32 1, i32 2, i32 3>
+ ret <4 x float> %v2
}
-define %T @test2(%T %v1) {
+define <4 x float> @test2(<4 x float> %v1) {
; CHECK: @test2
-; CHECK: ret %T %v1
- %v2 = shufflevector %T %v1, %T %v1, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
- ret %T %v2
+; CHECK: ret <4 x float> %v1
+ %v2 = shufflevector <4 x float> %v1, <4 x float> %v1, <4 x i32> <i32 0, i32 5, i32 2, i32 7>
+ ret <4 x float> %v2
}
-define float @test3(%T %A, %T %B, float %f) {
+define float @test3(<4 x float> %A, <4 x float> %B, float %f) {
; CHECK: @test3
; CHECK: ret float %f
- %C = insertelement %T %A, float %f, i32 0
- %D = shufflevector %T %C, %T %B, <4 x i32> <i32 5, i32 0, i32 2, i32 7>
- %E = extractelement %T %D, i32 1
+ %C = insertelement <4 x float> %A, float %f, i32 0
+ %D = shufflevector <4 x float> %C, <4 x float> %B, <4 x i32> <i32 5, i32 0, i32 2, i32 7>
+ %E = extractelement <4 x float> %D, i32 1
ret float %E
}
@@ -57,7 +54,7 @@ define float @test6(<4 x float> %X) {
define <4 x float> @test7(<4 x float> %tmp45.i) {
; CHECK: @test7
-; CHECK-NEXT: ret %T %tmp45.i
+; CHECK-NEXT: ret <4 x float> %tmp45.i
%tmp1642.i = shufflevector <4 x float> %tmp45.i, <4 x float> undef, <4 x i32> < i32 0, i32 1, i32 6, i32 7 >
ret <4 x float> %tmp1642.i
}