aboutsummaryrefslogtreecommitdiff
path: root/tests/cases/storestruct.ll
diff options
context:
space:
mode:
Diffstat (limited to 'tests/cases/storestruct.ll')
-rw-r--r--tests/cases/storestruct.ll10
1 files changed, 7 insertions, 3 deletions
diff --git a/tests/cases/storestruct.ll b/tests/cases/storestruct.ll
index a5b7483b..3e996195 100644
--- a/tests/cases/storestruct.ll
+++ b/tests/cases/storestruct.ll
@@ -1,6 +1,6 @@
; ModuleID = '/dev/shm/tmp/src.cpp.o'
-target datalayout = "e-p:32:32:32-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:32:64-f32:32:32-f64:32:64-v64:64:64-v128:128:128-a0:0:64-f80:32:32-n8:16:32"
-target triple = "i386-pc-linux-gnu"
+target datalayout = "e-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-p:32:32:32-v128:32:32"
+target triple = "le32-unknown-nacl"
; Load and store an entire structure as a whole (and also load as a whole, extract values and save separately, etc.)
@@ -43,7 +43,11 @@ entry:
%call2 = call i32 (i8*, ...)* @printf(i8* getelementptr inbounds ([9 x i8]* @.str, i32 0, i32 0), i32 %tmp5, i32 %tmp6), !dbg !18 ; [#uses=0]
%ptr = inttoptr i32 52 to i32* ; [#uses=1]
- store %struct.X { i32 ptrtoint (i32* getelementptr inbounds (i32* %ptr, i32 1, i32 0) to i32), i32 3 }, %struct.X* %y, align 4 ; store entire struct at once
+ %ptrgep = getelementptr inbounds i32* %ptr, i32 1
+ %ptrgepint = ptrtoint i32* %ptrgep to i32
+ %ss1 = insertvalue %struct.X undef, i32 %ptrgepint, 0
+ %ss2 = insertvalue %struct.X %ss1, i32 3, 1
+ store %struct.X %ss2, %struct.X* %y, align 4 ; store entire struct at once
%tmp5b = load i32* %a1, align 4, !dbg !18 ; [#uses=1]
%tmp6b = load i32* %b2, align 4, !dbg !18 ; [#uses=1]