1 ; RUN: llc < %s -march=xcore > %t1.s
2 ; RUN: not grep add %t1.s
3 ; RUN: not grep ldaw %t1.s
4 ; RUN: not grep lda16 %t1.s
5 ; RUN: not grep zext %t1.s
6 ; RUN: not grep sext %t1.s
7 ; RUN: grep "ldw" %t1.s | count 2
8 ; RUN: grep "ld16s" %t1.s | count 1
9 ; RUN: grep "ld8u" %t1.s | count 1
11 define i32 @load32(i32* %p, i32 %offset) nounwind {
13 %0 = getelementptr i32* %p, i32 %offset
14 %1 = load i32* %0, align 4
18 define i32 @load32_imm(i32* %p) nounwind {
20 %0 = getelementptr i32* %p, i32 11
21 %1 = load i32* %0, align 4
25 define i32 @load16(i16* %p, i32 %offset) nounwind {
27 %0 = getelementptr i16* %p, i32 %offset
28 %1 = load i16* %0, align 2
29 %2 = sext i16 %1 to i32
33 define i32 @load8(i8* %p, i32 %offset) nounwind {
35 %0 = getelementptr i8* %p, i32 %offset
36 %1 = load i8* %0, align 1
37 %2 = zext i8 %1 to i32