aboutsummaryrefslogtreecommitdiffstats
path: root/test/Transforms/LICM
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-11-17 17:39:19 +0000
committerChris Lattner <sabre@nondot.org>2004-11-17 17:39:19 +0000
commit2dee43d317982f76e03f21e0f84621db6a35e633 (patch)
tree357ef77f02cb2b9e75a72103c8a87fa883da07b3 /test/Transforms/LICM
parent86f42db22b6c343f175b65c08bd2b5164a6d9148 (diff)
downloadexternal_llvm-2dee43d317982f76e03f21e0f84621db6a35e633.zip
external_llvm-2dee43d317982f76e03f21e0f84621db6a35e633.tar.gz
external_llvm-2dee43d317982f76e03f21e0f84621db6a35e633.tar.bz2
New testcase that crashes licm
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@17912 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/Transforms/LICM')
-rw-r--r--test/Transforms/LICM/2004-11-17-UndefIndexCrash.ll24
1 files changed, 24 insertions, 0 deletions
diff --git a/test/Transforms/LICM/2004-11-17-UndefIndexCrash.ll b/test/Transforms/LICM/2004-11-17-UndefIndexCrash.ll
new file mode 100644
index 0000000..7bd4258
--- /dev/null
+++ b/test/Transforms/LICM/2004-11-17-UndefIndexCrash.ll
@@ -0,0 +1,24 @@
+; RUN: llvm-as < %s | opt -licm -disable-output
+
+ %struct.roadlet = type { sbyte*, %struct.vehicle*, [8 x %struct.roadlet*], [8 x %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)*] }
+ %struct.vehicle = type { %struct.roadlet*, sbyte*, int, int, %union.._631., int }
+ %union.._631. = type { int }
+
+implementation ; Functions:
+
+declare %struct.roadlet* %_Z11return_nullP7roadletP7vehicle9direction(%struct.roadlet*, %struct.vehicle*, int)
+
+declare %struct.roadlet* %_Z14lane_switch_okP7roadletP7vehicle9direction(%struct.roadlet*, %struct.vehicle*, int)
+
+void %main() {
+__main.entry: ; preds = %invoke_cont.1
+ br label %invoke_cont.3
+
+invoke_cont.3: ; preds = %__main.entry, %invoke_cont.3
+ %tmp.34.i.i502.7 = getelementptr %struct.roadlet* null, int 0, uint 3, int 7 ; <%struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)**> [#uses=1]
+ store %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)* %_Z11return_nullP7roadletP7vehicle9direction, %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)** %tmp.34.i.i502.7
+ store %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)* %_Z14lane_switch_okP7roadletP7vehicle9direction, %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)** null
+ %tmp.4.i.i339 = getelementptr %struct.roadlet* null, int 0, uint 3, int undef ; <%struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)**> [#uses=1]
+ store %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)* %_Z11return_nullP7roadletP7vehicle9direction, %struct.roadlet* (%struct.roadlet*, %struct.vehicle*, int)** %tmp.4.i.i339
+ br label %invoke_cont.3
+}