2014-04-04 00:01:44 +08:00
|
|
|
; RUN: llc -mtriple=arm-eabi %s -o - | FileCheck %s
|
2008-02-18 04:02:20 +08:00
|
|
|
|
|
|
|
define i32 @f1(i8* %p) {
|
2006-10-17 01:17:22 +08:00
|
|
|
entry:
|
2008-02-18 04:02:20 +08:00
|
|
|
%tmp = load i8* %p ; <i8> [#uses=1]
|
|
|
|
%tmp1 = sext i8 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp1
|
2006-10-17 01:17:22 +08:00
|
|
|
}
|
|
|
|
|
2008-02-18 04:02:20 +08:00
|
|
|
define i32 @f2(i8* %p) {
|
2006-10-17 01:17:22 +08:00
|
|
|
entry:
|
2008-02-18 04:02:20 +08:00
|
|
|
%tmp = load i8* %p ; <i8> [#uses=1]
|
|
|
|
%tmp2 = zext i8 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp2
|
2006-10-17 01:17:22 +08:00
|
|
|
}
|
|
|
|
|
2008-02-18 04:02:20 +08:00
|
|
|
define i32 @f3(i16* %p) {
|
2006-10-17 01:17:22 +08:00
|
|
|
entry:
|
2008-02-18 04:02:20 +08:00
|
|
|
%tmp = load i16* %p ; <i16> [#uses=1]
|
|
|
|
%tmp3 = sext i16 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp3
|
2006-10-17 01:17:22 +08:00
|
|
|
}
|
|
|
|
|
2008-02-18 04:02:20 +08:00
|
|
|
define i32 @f4(i16* %p) {
|
2006-10-17 01:17:22 +08:00
|
|
|
entry:
|
2008-02-18 04:02:20 +08:00
|
|
|
%tmp = load i16* %p ; <i16> [#uses=1]
|
|
|
|
%tmp4 = zext i16 %tmp to i32 ; <i32> [#uses=1]
|
|
|
|
ret i32 %tmp4
|
2006-10-17 01:17:22 +08:00
|
|
|
}
|
2014-04-04 00:01:44 +08:00
|
|
|
|
|
|
|
; CHECK: ldrsb
|
|
|
|
; CHECK: ldrb
|
|
|
|
; CHECK: ldrsh
|
|
|
|
; CHECK: ldrh
|
|
|
|
|