[llvm-commits] [llvm] r170271 - /llvm/trunk/test/Transforms/SROA/basictest.ll
Chandler Carruth
chandlerc at gmail.com
Sat Dec 15 01:31:54 PST 2012
Author: chandlerc
Date: Sat Dec 15 03:31:54 2012
New Revision: 170271
URL: http://llvm.org/viewvc/llvm-project?rev=170271&view=rev
Log:
Add a corollary test for PR14572. We got this code path correct already.
Modified:
llvm/trunk/test/Transforms/SROA/basictest.ll
Modified: llvm/trunk/test/Transforms/SROA/basictest.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/Transforms/SROA/basictest.ll?rev=170271&r1=170270&r2=170271&view=diff
==============================================================================
--- llvm/trunk/test/Transforms/SROA/basictest.ll (original)
+++ llvm/trunk/test/Transforms/SROA/basictest.ll Sat Dec 15 03:31:54 2012
@@ -1177,10 +1177,10 @@
ret void
}
-define <3 x i8> @PR14572(i32 %x) {
+define <3 x i8> @PR14572.1(i32 %x) {
; Ensure that a split integer store which is wider than the type size of the
; alloca (relying on the alloc size padding) doesn't trigger an assert.
-; CHECK: @PR14572
+; CHECK: @PR14572.1
entry:
%a = alloca <3 x i8>, align 4
@@ -1192,3 +1192,19 @@
ret <3 x i8> %y
; CHECK: ret <3 x i8>
}
+
+define i32 @PR14572.2(<3 x i8> %x) {
+; Ensure that a split integer load which is wider than the type size of the
+; alloca (relying on the alloc size padding) doesn't trigger an assert.
+; CHECK: @PR14572.2
+
+entry:
+ %a = alloca <3 x i8>, align 4
+; CHECK-NOT: alloca
+
+ store <3 x i8> %x, <3 x i8>* %a, align 1
+ %cast = bitcast <3 x i8>* %a to i32*
+ %y = load i32* %cast, align 4
+ ret i32 %y
+; CHECK: ret i32
+}
More information about the llvm-commits
mailing list