aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/PredicateSimplifier/2006-11-04-ImpossibleGT.ll19
-rw-r--r--test/Transforms/PredicateSimplifier/2006-11-04-ReplacingZeros.ll30
-rw-r--r--test/Transforms/PredicateSimplifier/2006-11-05-CycleGTLT.ll14
-rw-r--r--test/Transforms/PredicateSimplifier/2006-11-11-Squeeze.ll31
-rw-r--r--test/Transforms/PredicateSimplifier/2006-11-12-MergeNodes.ll54
5 files changed, 148 insertions, 0 deletions
diff --git a/test/Transforms/PredicateSimplifier/2006-11-04-ImpossibleGT.ll b/test/Transforms/PredicateSimplifier/2006-11-04-ImpossibleGT.ll
new file mode 100644
index 0000000..c401bfe
--- /dev/null
+++ b/test/Transforms/PredicateSimplifier/2006-11-04-ImpossibleGT.ll
@@ -0,0 +1,19 @@
+; RUN: llvm-as < %s | opt -predsimplify -disable-output
+
+void %readMotionInfoFromNAL() {
+entry:
+ br bool false, label %bb2425, label %cond_next30
+
+cond_next30: ; preds = %entry
+ ret void
+
+bb2418: ; preds = %bb2425
+ ret void
+
+bb2425: ; preds = %entry
+ %tmp2427 = setgt int 0, 3 ; <bool> [#uses=1]
+ br bool %tmp2427, label %cond_next2429, label %bb2418
+
+cond_next2429: ; preds = %bb2425
+ ret void
+}
diff --git a/test/Transforms/PredicateSimplifier/2006-11-04-ReplacingZeros.ll b/test/Transforms/PredicateSimplifier/2006-11-04-ReplacingZeros.ll
new file mode 100644
index 0000000..f3c17c3
--- /dev/null
+++ b/test/Transforms/PredicateSimplifier/2006-11-04-ReplacingZeros.ll
@@ -0,0 +1,30 @@
+; RUN: llvm-as < %s | opt -predsimplify -disable-output
+
+int %test_wp_B_slice(int %select_method) {
+entry:
+ br label %bb309
+
+cond_true114: ; preds = %bb309
+ %tmp130 = setlt int 0, 128 ; <bool> [#uses=1]
+ %min = select bool %tmp130, int 0, int 127 ; <int> [#uses=2]
+ %tmp143 = load int* null ; <int> [#uses=1]
+ br bool false, label %bb303, label %bb314
+
+cond_true166: ; preds = %bb303
+ ret int 0
+
+cond_false200: ; preds = %bb303
+ %tmp205 = sdiv int %min, 2 ; <int> [#uses=1]
+ %iftmp.380.0.p = select bool false, int 0, int %tmp205 ; <int> [#uses=0]
+ ret int 0
+
+bb303: ; preds = %cond_true114
+ %tmp165 = seteq int %min, 0 ; <bool> [#uses=1]
+ br bool %tmp165, label %cond_true166, label %cond_false200
+
+bb309: ; preds = %bb19
+ br bool false, label %cond_true114, label %bb314
+
+bb314: ; preds = %bb309
+ ret int 0
+}
diff --git a/test/Transforms/PredicateSimplifier/2006-11-05-CycleGTLT.ll b/test/Transforms/PredicateSimplifier/2006-11-05-CycleGTLT.ll
new file mode 100644
index 0000000..5aaf503
--- /dev/null
+++ b/test/Transforms/PredicateSimplifier/2006-11-05-CycleGTLT.ll
@@ -0,0 +1,14 @@
+; RUN: llvm-as < %s | opt -predsimplify -disable-output
+
+void %diff(int %N) {
+entry:
+ %tmp = setgt int %N, 0 ; <bool> [#uses=1]
+ br bool %tmp, label %bb519, label %bb744
+
+bb519: ; preds = %entry
+ %tmp720101 = setlt int %N, 0 ; <bool> [#uses=1]
+ br bool %tmp720101, label %bb744, label %bb744
+
+bb744: ; preds = %bb519, %entry
+ ret void
+}
diff --git a/test/Transforms/PredicateSimplifier/2006-11-11-Squeeze.ll b/test/Transforms/PredicateSimplifier/2006-11-11-Squeeze.ll
new file mode 100644
index 0000000..d260ae3
--- /dev/null
+++ b/test/Transforms/PredicateSimplifier/2006-11-11-Squeeze.ll
@@ -0,0 +1,31 @@
+; RUN: llvm-as < %s | opt -predsimplify -disable-output
+
+ %struct.cube_struct = type { int, int, int, int*, int*, int*, int*, int*, uint*, uint*, uint**, uint**, uint*, uint*, uint, int, int*, int, int }
+%cube = external global %struct.cube_struct ; <%struct.cube_struct*> [#uses=2]
+
+implementation ; Functions:
+
+fastcc void %cube_setup() {
+entry:
+ %tmp = load int* getelementptr (%struct.cube_struct* %cube, int 0, uint 2) ; <int> [#uses=2]
+ %tmp = setlt int %tmp, 0 ; <bool> [#uses=1]
+ br bool %tmp, label %bb, label %cond_next
+
+cond_next: ; preds = %entry
+ %tmp2 = load int* getelementptr (%struct.cube_struct* %cube, int 0, uint 1) ; <int> [#uses=2]
+ %tmp5 = setlt int %tmp2, %tmp ; <bool> [#uses=1]
+ br bool %tmp5, label %bb, label %bb6
+
+bb: ; preds = %cond_next, %entry
+ unreachable
+
+bb6: ; preds = %cond_next
+ %tmp98124 = setgt int %tmp2, 0 ; <bool> [#uses=1]
+ br bool %tmp98124, label %bb42, label %bb99
+
+bb42: ; preds = %bb6
+ ret void
+
+bb99: ; preds = %bb6
+ ret void
+}
diff --git a/test/Transforms/PredicateSimplifier/2006-11-12-MergeNodes.ll b/test/Transforms/PredicateSimplifier/2006-11-12-MergeNodes.ll
new file mode 100644
index 0000000..134dd0f
--- /dev/null
+++ b/test/Transforms/PredicateSimplifier/2006-11-12-MergeNodes.ll
@@ -0,0 +1,54 @@
+; RUN: llvm-as < %s | opt -predsimplify -disable-output
+
+; ModuleID = 'b.bc'
+target datalayout = "e-p:32:32"
+target endian = little
+target pointersize = 32
+target triple = "i686-pc-linux-gnu"
+deplibs = [ "c", "crtend" ]
+ %struct.VDIR_ST = type { int, int, int, %struct.acl*, %struct.pfile*, %struct.vlink*, %struct.vlink*, %struct.vlink*, %struct.VDIR_ST*, %struct.VDIR_ST* }
+ %struct.acl = type { int, sbyte*, sbyte*, sbyte*, %struct.restrict*, %struct.acl*, %struct.acl* }
+ %struct.avalue = type { sbyte* }
+ %struct.pattrib = type { sbyte, sbyte*, sbyte*, %struct.avalue, %struct.pattrib*, %struct.pattrib* }
+ %struct.pfile = type { int, int, int, int, int, %struct.vlink*, %struct.vlink*, %struct.pattrib*, %struct.pfile*, %struct.pfile* }
+ %struct.restrict = type { %struct.acl*, %struct.acl* }
+ %struct.vlink = type { int, sbyte*, sbyte, int, sbyte*, %struct.vlink*, %struct.vlink*, sbyte*, sbyte*, sbyte*, sbyte*, int, int, %struct.acl*, int, int, sbyte*, %struct.pattrib*, %struct.pfile*, %struct.vlink*, %struct.vlink* }
+
+implementation ; Functions:
+
+void %vl_insert(%struct.vlink* %vl) {
+entry:
+ %tmp91 = call int %vl_comp( ) ; <int> [#uses=2]
+ %tmp93 = setgt int %tmp91, 0 ; <bool> [#uses=1]
+ br bool %tmp93, label %cond_next84, label %bb94
+
+cond_next84: ; preds = %entry
+ ret void
+
+bb94: ; preds = %entry
+ %tmp96 = seteq int %tmp91, 0 ; <bool> [#uses=1]
+ br bool %tmp96, label %cond_true97, label %cond_next203
+
+cond_true97: ; preds = %bb94
+ br bool false, label %cond_next105, label %cond_true102
+
+cond_true102: ; preds = %cond_true97
+ ret void
+
+cond_next105: ; preds = %cond_true97
+ %tmp110 = getelementptr %struct.vlink* %vl, int 0, uint 12 ; <int*> [#uses=1]
+ %tmp111 = load int* %tmp110 ; <int> [#uses=1]
+ %tmp129 = seteq int %tmp111, 0 ; <bool> [#uses=1]
+ br bool %tmp129, label %cond_true130, label %cond_next133
+
+cond_true130: ; preds = %cond_next105
+ ret void
+
+cond_next133: ; preds = %cond_next105
+ ret void
+
+cond_next203: ; preds = %bb94
+ ret void
+}
+
+declare int %vl_comp()