summaryrefslogtreecommitdiff
path: root/test/Transforms/ConstantMerge
diff options
context:
space:
mode:
Diffstat (limited to 'test/Transforms/ConstantMerge')
-rw-r--r--test/Transforms/ConstantMerge/2011-01-15-EitherOrder.ll18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/Transforms/ConstantMerge/2011-01-15-EitherOrder.ll b/test/Transforms/ConstantMerge/2011-01-15-EitherOrder.ll
new file mode 100644
index 0000000000..7001ce1ba4
--- /dev/null
+++ b/test/Transforms/ConstantMerge/2011-01-15-EitherOrder.ll
@@ -0,0 +1,18 @@
+; RUN: opt -constmerge %s -S -o - | FileCheck %s
+; PR8978
+
+declare i32 @zed(%struct.foobar*, %struct.foobar*)
+
+%struct.foobar = type { i32 }
+; CHECK: bar.d
+@bar.d = constant %struct.foobar zeroinitializer, align 4
+; CHECK-NOT: foo.d
+@foo.d = internal constant %struct.foobar zeroinitializer, align 4
+define i32 @main() nounwind ssp {
+entry:
+; CHECK: bar.d
+ %call2 = tail call i32 @zed(%struct.foobar* @foo.d, %struct.foobar* @bar.d)
+nounwind
+ ret i32 0
+}
+