aboutsummaryrefslogtreecommitdiff
path: root/test/Transforms
diff options
context:
space:
mode:
authorDerek Schuff <dschuff@chromium.org>2013-05-28 15:07:50 -0700
committerDerek Schuff <dschuff@chromium.org>2013-05-28 15:07:50 -0700
commitdc0ea9545dcc70f628081173e2a1e41840f197a8 (patch)
treed5a4d4afbecf0a050e71c8d88e9e3fba6b4c0c24 /test/Transforms
parent9a6f5fa4707744e76c4c89e6c569fea7b9f81fac (diff)
Fix integer promotion pass to handle casts to struct pointer types.
Also fix the diagnostic asserts in getPromotedType. R=mseaborn@chromium.org BUG= https://code.google.com/p/nativeclient/issues/detail?id=3360 Review URL: https://codereview.chromium.org/16004003
Diffstat (limited to 'test/Transforms')
-rw-r--r--test/Transforms/NaCl/promote-integers.ll7
1 files changed, 6 insertions, 1 deletions
diff --git a/test/Transforms/NaCl/promote-integers.ll b/test/Transforms/NaCl/promote-integers.ll
index 1ae8e19a27..5e73dc8353 100644
--- a/test/Transforms/NaCl/promote-integers.ll
+++ b/test/Transforms/NaCl/promote-integers.ll
@@ -108,12 +108,17 @@ define void @icmpsigned(i32 %a) {
ret void
}
+%struct.ints = type { i32, i32 }
; CHECK: @bc1
; CHECK: bc1 = bitcast i32* %a to i64*
; CHECK-NEXT: bc2 = bitcast i64* %bc1 to i32*
+; CHECK-NEXT: bc3 = bitcast %struct.ints* null to i64*
+; CHECK-NEXT: bc4 = bitcast i64* %bc1 to %struct.ints*
define i32* @bc1(i32* %a) {
%bc1 = bitcast i32* %a to i40*
%bc2 = bitcast i40* %bc1 to i32*
+ %bc3 = bitcast %struct.ints* null to i40*
+ %bc4 = bitcast i40* %bc1 to %struct.ints*
ret i32* %bc2
}
@@ -238,7 +243,7 @@ define void @select1(i32 %a) {
}
; CHECK: @alloca40
-; CHECK: alloca i64, align 8
+; CHECK: %a = alloca i64, align 8
define void @alloca40() {
%a = alloca i40, align 8
%b = bitcast i40* %a to i8*