• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=xcore | FileCheck %s
2
3define void @store32(i32* %p, i32 %offset, i32 %val) nounwind {
4entry:
5; CHECK-LABEL: store32:
6; CHECK: stw r2, r0[r1]
7	%0 = getelementptr i32, i32* %p, i32 %offset
8	store i32 %val, i32* %0, align 4
9	ret void
10}
11
12define void @store32_imm(i32* %p, i32 %val) nounwind {
13entry:
14; CHECK-LABEL: store32_imm:
15; CHECK: stw r1, r0[11]
16	%0 = getelementptr i32, i32* %p, i32 11
17	store i32 %val, i32* %0, align 4
18	ret void
19}
20
21define void @store16(i16* %p, i32 %offset, i16 %val) nounwind {
22entry:
23; CHECK-LABEL: store16:
24; CHECK: st16 r2, r0[r1]
25	%0 = getelementptr i16, i16* %p, i32 %offset
26	store i16 %val, i16* %0, align 2
27	ret void
28}
29
30define void @store8(i8* %p, i32 %offset, i8 %val) nounwind {
31entry:
32; CHECK-LABEL: store8:
33; CHECK: st8 r2, r0[r1]
34	%0 = getelementptr i8, i8* %p, i32 %offset
35	store i8 %val, i8* %0, align 1
36	ret void
37}
38