summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-09-21 17:24:04 +0000
committerChris Lattner <sabre@nondot.org>2009-09-21 17:24:04 +0000
commit8b2bc3d5746c6094e90c416d72c3646227598ae3 (patch)
treebf9b5c8ec786a3c210a916e95a5ddb9aff4ba7a8 /test
parentf8349ac8b8534960190d830ee86239a5eade4737 (diff)
downloadexternal_llvm-8b2bc3d5746c6094e90c416d72c3646227598ae3.zip
external_llvm-8b2bc3d5746c6094e90c416d72c3646227598ae3.tar.gz
external_llvm-8b2bc3d5746c6094e90c416d72c3646227598ae3.tar.bz2
fix PR5016, a crash I introduced in GVN handing first class
arrays and structs, which cannot be bitcast to integers. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@82460 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r--test/Transforms/GVN/rle.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/Transforms/GVN/rle.ll b/test/Transforms/GVN/rle.ll
index afdcd5d..cdd1f4f 100644
--- a/test/Transforms/GVN/rle.ll
+++ b/test/Transforms/GVN/rle.ll
@@ -13,6 +13,20 @@ define i32 @test0(i32 %V, i32* %P) {
; CHECK: ret i32 %V
}
+
+;;===----------------------------------------------------------------------===;;
+;; Tests for crashers
+;;===----------------------------------------------------------------------===;;
+
+;; PR5016
+define i8 @crash0({i32, i32} %A, {i32, i32}* %P) {
+ store {i32, i32} %A, {i32, i32}* %P
+ %X = bitcast {i32, i32}* %P to i8*
+ %Y = load i8* %X
+ ret i8 %Y
+}
+
+
;;===----------------------------------------------------------------------===;;
;; Store -> Load and Load -> Load forwarding where src and dst are different
;; types, but where the base pointer is a must alias.