aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/ARM/load.ll
blob: 3b2d637cb26ef5e059d7eb9adb4fc7b9f465ab0b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s

define i32 @f1(i8* %p) {
entry:
        %tmp = load i8, i8* %p              ; <i8> [#uses=1]
        %tmp1 = sext i8 %tmp to i32              ; <i32> [#uses=1]
        ret i32 %tmp1
}

define i32 @f2(i8* %p) {
entry:
        %tmp = load i8, i8* %p              ; <i8> [#uses=1]
        %tmp2 = zext i8 %tmp to i32              ; <i32> [#uses=1]
        ret i32 %tmp2
}

define i32 @f3(i16* %p) {
entry:
        %tmp = load i16, i16* %p             ; <i16> [#uses=1]
        %tmp3 = sext i16 %tmp to i32             ; <i32> [#uses=1]
        ret i32 %tmp3
}

define i32 @f4(i16* %p) {
entry:
        %tmp = load i16, i16* %p             ; <i16> [#uses=1]
        %tmp4 = zext i16 %tmp to i32             ; <i32> [#uses=1]
        ret i32 %tmp4
}

; CHECK: ldrsb
; CHECK: ldrb
; CHECK: ldrsh
; CHECK: ldrh