aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-04-09 22:03:10 +0000
committerChris Lattner <sabre@nondot.org>2005-04-09 22:03:10 +0000
commitd0abb7a2ec61c61e35d4c8da1708dd39ab4d1d48 (patch)
tree1600dda6c6bb1f4a9621d984aba324d58a9c17f1
parenta2daa8c78d8749d6b4743e8bbfe4d522cd13a669 (diff)
new testcase that used to crash the ppc fe. It could effect any simpleisel
that is not careful, so I'm checking it into the generic tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@21190 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll21
1 files changed, 21 insertions, 0 deletions
diff --git a/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll b/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll
new file mode 100644
index 0000000000..ad379dac59
--- /dev/null
+++ b/test/CodeGen/Generic/2005-04-09-GlobalInPHI.ll
@@ -0,0 +1,21 @@
+; RUN: llvm-as < %s | llc
+ %struct.TypHeader = type { uint, %struct.TypHeader**, [3 x sbyte], ubyte }
+%.str_67 = external global [4 x sbyte] ; <[4 x sbyte]*> [#uses=1]
+%.str_87 = external global [17 x sbyte] ; <[17 x sbyte]*> [#uses=1]
+
+implementation ; Functions:
+
+void %PrBinop() {
+entry:
+ br bool false, label %cond_true, label %else.0
+
+cond_true: ; preds = %entry
+ br label %else.0
+
+else.0:
+ %tmp.167.1 = phi int [ cast ([17 x sbyte]* %.str_87 to int), %entry ], [ 0, %cond_true ]
+ call void %Pr( sbyte* getelementptr ([4 x sbyte]* %.str_67, int 0, int 0), int 0, int 0 )
+ ret void
+}
+
+declare void %Pr(sbyte*, int, int)