aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms/MergeFunc
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/MergeFunc')
-rw-r--r--test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll2
-rw-r--r--test/Transforms/MergeFunc/2013-01-10-MergeFuncAssert.ll36
-rw-r--r--test/Transforms/MergeFunc/Stats/lit.local.cfg4
-rw-r--r--test/Transforms/MergeFunc/Stats/phi-speculation1.ll (renamed from test/Transforms/MergeFunc/phi-speculation1.ll)0
-rw-r--r--test/Transforms/MergeFunc/Stats/phi-speculation2.ll (renamed from test/Transforms/MergeFunc/phi-speculation2.ll)0
-rw-r--r--test/Transforms/MergeFunc/Stats/vector.ll (renamed from test/Transforms/MergeFunc/vector.ll)0
-rw-r--r--test/Transforms/MergeFunc/Stats/vectors-and-arrays.ll (renamed from test/Transforms/MergeFunc/vectors-and-arrays.ll)0
7 files changed, 41 insertions, 1 deletions
diff --git a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
index e3e52b401a..19cd6a5171 100644
--- a/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
+++ b/test/Transforms/MergeFunc/2011-02-08-RemoveEqual.ll
@@ -1,4 +1,4 @@
-; RUN: opt -mergefunc %s -disable-output
+; RUN: opt -mergefunc -disable-output < %s
; This used to crash.
target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
diff --git a/test/Transforms/MergeFunc/2013-01-10-MergeFuncAssert.ll b/test/Transforms/MergeFunc/2013-01-10-MergeFuncAssert.ll
new file mode 100644
index 0000000000..3f6a5ba157
--- /dev/null
+++ b/test/Transforms/MergeFunc/2013-01-10-MergeFuncAssert.ll
@@ -0,0 +1,36 @@
+; RUN: opt -mergefunc -disable-output < %s
+; This used to trigger a ConstantExpr::getBitCast assertion.
+
+define void @t1() unnamed_addr uwtable ssp align 2 {
+entry:
+ switch i32 undef, label %sw.bb12 [
+ i32 127, label %sw.bb
+ i32 126, label %sw.bb4
+ ]
+
+sw.bb: ; preds = %entry
+ unreachable
+
+sw.bb4: ; preds = %entry
+ unreachable
+
+sw.bb12: ; preds = %entry
+ ret void
+}
+
+define void @t2() unnamed_addr uwtable ssp align 2 {
+entry:
+ switch i32 undef, label %sw.bb8 [
+ i32 4, label %sw.bb
+ i32 3, label %sw.bb4
+ ]
+
+sw.bb: ; preds = %entry
+ unreachable
+
+sw.bb4: ; preds = %entry
+ ret void
+
+sw.bb8: ; preds = %entry
+ unreachable
+}
diff --git a/test/Transforms/MergeFunc/Stats/lit.local.cfg b/test/Transforms/MergeFunc/Stats/lit.local.cfg
new file mode 100644
index 0000000000..89c0cd9d48
--- /dev/null
+++ b/test/Transforms/MergeFunc/Stats/lit.local.cfg
@@ -0,0 +1,4 @@
+config.suffixes = ['.ll', '.c', '.cpp']
+
+if not config.root.enable_assertions:
+ config.unsupported = True
diff --git a/test/Transforms/MergeFunc/phi-speculation1.ll b/test/Transforms/MergeFunc/Stats/phi-speculation1.ll
index fd0baffb31..fd0baffb31 100644
--- a/test/Transforms/MergeFunc/phi-speculation1.ll
+++ b/test/Transforms/MergeFunc/Stats/phi-speculation1.ll
diff --git a/test/Transforms/MergeFunc/phi-speculation2.ll b/test/Transforms/MergeFunc/Stats/phi-speculation2.ll
index eec8b5c5a9..eec8b5c5a9 100644
--- a/test/Transforms/MergeFunc/phi-speculation2.ll
+++ b/test/Transforms/MergeFunc/Stats/phi-speculation2.ll
diff --git a/test/Transforms/MergeFunc/vector.ll b/test/Transforms/MergeFunc/Stats/vector.ll
index 4af079f8cd..4af079f8cd 100644
--- a/test/Transforms/MergeFunc/vector.ll
+++ b/test/Transforms/MergeFunc/Stats/vector.ll
diff --git a/test/Transforms/MergeFunc/vectors-and-arrays.ll b/test/Transforms/MergeFunc/Stats/vectors-and-arrays.ll
index dc64a0858b..dc64a0858b 100644
--- a/test/Transforms/MergeFunc/vectors-and-arrays.ll
+++ b/test/Transforms/MergeFunc/Stats/vectors-and-arrays.ll