new (undefined) testcase, distilled from 126.gcc that scalarrepl crashes on
authorChris Lattner <sabre@nondot.org>
Wed, 14 Dec 2005 17:23:20 +0000 (17:23 +0000)
committerChris Lattner <sabre@nondot.org>
Wed, 14 Dec 2005 17:23:20 +0000 (17:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@24707 91177308-0d34-0410-b5e6-96231b3b80d8

test/Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll [new file with mode: 0644]

diff --git a/test/Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll b/test/Transforms/ScalarRepl/2005-12-14-UnionPromoteCrash.ll
new file mode 100644 (file)
index 0000000..647311b
--- /dev/null
@@ -0,0 +1,34 @@
+; RUN: llvm-as < %s | opt -scalarrepl -disable-output
+target endian = big
+target pointersize = 32
+       %struct.rtx_def = type { [2 x ubyte], int, [1 x %union.rtunion_def] }
+       %union.rtunion_def = type { uint }
+
+implementation   ; Functions:
+
+void %find_reloads() {
+entry:
+       %c_addr.i = alloca sbyte                ; <sbyte*> [#uses=1]
+       switch uint 0, label %return [
+                uint 36, label %label.7
+                uint 34, label %label.7
+                uint 41, label %label.5
+       ]
+
+label.5:               ; preds = %entry
+       ret void
+
+label.7:               ; preds = %entry, %entry
+       br bool false, label %then.4, label %switchexit.0
+
+then.4:                ; preds = %label.7
+       %tmp.0.i = cast sbyte* %c_addr.i to int*                ; <int*> [#uses=1]
+       store int 44, int* %tmp.0.i
+       ret void
+
+switchexit.0:          ; preds = %label.7
+       ret void
+
+return:                ; preds = %entry
+       ret void
+}