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 ptr @test_stbu(ptr %base, i8 zeroext %val) nounwind {
8 %arrayidx = getelementptr inbounds i8, ptr %base, i64 16
9 store i8 %val, ptr %arrayidx, align 1
17 define ptr @test_stbux(ptr %base, i8 zeroext %val, i64 %offset) nounwind {
19 %arrayidx = getelementptr inbounds i8, ptr %base, i64 %offset
20 store i8 %val, ptr %arrayidx, align 1
28 define ptr @test_sthu(ptr %base, i16 zeroext %val) nounwind {
30 %arrayidx = getelementptr inbounds i16, ptr %base, i64 16
31 store i16 %val, ptr %arrayidx, align 2
39 define ptr @test_sthux(ptr %base, i16 zeroext %val, i64 %offset) nounwind {
41 %arrayidx = getelementptr inbounds i16, ptr %base, i64 %offset
42 store i16 %val, ptr %arrayidx, align 2
51 define ptr @test_stwu(ptr %base, i32 zeroext %val) nounwind {
53 %arrayidx = getelementptr inbounds i32, ptr %base, i64 16
54 store i32 %val, ptr %arrayidx, align 4
62 define ptr @test_stwux(ptr %base, i32 zeroext %val, i64 %offset) nounwind {
64 %arrayidx = getelementptr inbounds i32, ptr %base, i64 %offset
65 store i32 %val, ptr %arrayidx, align 4
74 define ptr @test_stbu8(ptr %base, i64 %val) nounwind {
76 %conv = trunc i64 %val to i8
77 %arrayidx = getelementptr inbounds i8, ptr %base, i64 16
78 store i8 %conv, ptr %arrayidx, align 1
86 define ptr @test_stbux8(ptr %base, i64 %val, i64 %offset) nounwind {
88 %conv = trunc i64 %val to i8
89 %arrayidx = getelementptr inbounds i8, ptr %base, i64 %offset
90 store i8 %conv, ptr %arrayidx, align 1
98 define ptr @test_sthu8(ptr %base, i64 %val) nounwind {
100 %conv = trunc i64 %val to i16
101 %arrayidx = getelementptr inbounds i16, ptr %base, i64 16
102 store i16 %conv, ptr %arrayidx, align 2
110 define ptr @test_sthux8(ptr %base, i64 %val, i64 %offset) nounwind {
112 %conv = trunc i64 %val to i16
113 %arrayidx = getelementptr inbounds i16, ptr %base, i64 %offset
114 store i16 %conv, ptr %arrayidx, align 2
123 define ptr @test_stwu8(ptr %base, i64 %val) nounwind {
125 %conv = trunc i64 %val to i32
126 %arrayidx = getelementptr inbounds i32, ptr %base, i64 16
127 store i32 %conv, ptr %arrayidx, align 4
135 define ptr @test_stwux8(ptr %base, i64 %val, i64 %offset) nounwind {
137 %conv = trunc i64 %val to i32
138 %arrayidx = getelementptr inbounds i32, ptr %base, i64 %offset
139 store i32 %conv, ptr %arrayidx, align 4
148 define ptr @test_stdu(ptr %base, i64 %val) nounwind {
150 %arrayidx = getelementptr inbounds i64, ptr %base, i64 16
151 store i64 %val, ptr %arrayidx, align 8
159 define ptr @test_stdux(ptr %base, i64 %val, i64 %offset) nounwind {
161 %arrayidx = getelementptr inbounds i64, ptr %base, i64 %offset
162 store i64 %val, ptr %arrayidx, align 8