1 ; RUN: llc -verify-machineinstrs < %s | FileCheck %s
3 target datalayout = "E-p:64:64:64-i1:8:8-i8:8:8-i16:16:16-i32:32:32-i64:64:64-f32:32:32-f64:64:64-f128:128:128-v128:128:128-n32:64"
4 target triple = "powerpc64-unknown-linux-gnu"
6 define i8* @test_stbu(i8* %base, i8 zeroext %val) nounwind {
8 %arrayidx = getelementptr inbounds i8, i8* %base, i64 16
9 store i8 %val, i8* %arrayidx, align 1
17 define i8* @test_stbux(i8* %base, i8 zeroext %val, i64 %offset) nounwind {
19 %arrayidx = getelementptr inbounds i8, i8* %base, i64 %offset
20 store i8 %val, i8* %arrayidx, align 1
28 define i16* @test_sthu(i16* %base, i16 zeroext %val) nounwind {
30 %arrayidx = getelementptr inbounds i16, i16* %base, i64 16
31 store i16 %val, i16* %arrayidx, align 2
39 define i16* @test_sthux(i16* %base, i16 zeroext %val, i64 %offset) nounwind {
41 %arrayidx = getelementptr inbounds i16, i16* %base, i64 %offset
42 store i16 %val, i16* %arrayidx, align 2
51 define i32* @test_stwu(i32* %base, i32 zeroext %val) nounwind {
53 %arrayidx = getelementptr inbounds i32, i32* %base, i64 16
54 store i32 %val, i32* %arrayidx, align 4
62 define i32* @test_stwux(i32* %base, i32 zeroext %val, i64 %offset) nounwind {
64 %arrayidx = getelementptr inbounds i32, i32* %base, i64 %offset
65 store i32 %val, i32* %arrayidx, align 4
74 define i8* @test_stbu8(i8* %base, i64 %val) nounwind {
76 %conv = trunc i64 %val to i8
77 %arrayidx = getelementptr inbounds i8, i8* %base, i64 16
78 store i8 %conv, i8* %arrayidx, align 1
86 define i8* @test_stbux8(i8* %base, i64 %val, i64 %offset) nounwind {
88 %conv = trunc i64 %val to i8
89 %arrayidx = getelementptr inbounds i8, i8* %base, i64 %offset
90 store i8 %conv, i8* %arrayidx, align 1
98 define i16* @test_sthu8(i16* %base, i64 %val) nounwind {
100 %conv = trunc i64 %val to i16
101 %arrayidx = getelementptr inbounds i16, i16* %base, i64 16
102 store i16 %conv, i16* %arrayidx, align 2
110 define i16* @test_sthux8(i16* %base, i64 %val, i64 %offset) nounwind {
112 %conv = trunc i64 %val to i16
113 %arrayidx = getelementptr inbounds i16, i16* %base, i64 %offset
114 store i16 %conv, i16* %arrayidx, align 2
123 define i32* @test_stwu8(i32* %base, i64 %val) nounwind {
125 %conv = trunc i64 %val to i32
126 %arrayidx = getelementptr inbounds i32, i32* %base, i64 16
127 store i32 %conv, i32* %arrayidx, align 4
135 define i32* @test_stwux8(i32* %base, i64 %val, i64 %offset) nounwind {
137 %conv = trunc i64 %val to i32
138 %arrayidx = getelementptr inbounds i32, i32* %base, i64 %offset
139 store i32 %conv, i32* %arrayidx, align 4
148 define i64* @test_stdu(i64* %base, i64 %val) nounwind {
150 %arrayidx = getelementptr inbounds i64, i64* %base, i64 16
151 store i64 %val, i64* %arrayidx, align 8
159 define i64* @test_stdux(i64* %base, i64 %val, i64 %offset) nounwind {
161 %arrayidx = getelementptr inbounds i64, i64* %base, i64 %offset
162 store i64 %val, i64* %arrayidx, align 8