Home | History | Annotate | Download | only in XCore
      1 ; RUN: llc < %s -march=xcore | FileCheck %s
      2 
      3 define void @store32(i32* %p, i32 %offset, i32 %val) nounwind {
      4 entry:
      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 
     12 define void @store32_imm(i32* %p, i32 %val) nounwind {
     13 entry:
     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 
     21 define void @store16(i16* %p, i32 %offset, i16 %val) nounwind {
     22 entry:
     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 
     30 define void @store8(i8* %p, i32 %offset, i8 %val) nounwind {
     31 entry:
     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