comparison test/CodeGen/Thumb/ldr_ext.ll @ 0:95c75e76d11b

LLVM 3.4
author Kaito Tokumori <e105711@ie.u-ryukyu.ac.jp>
date Thu, 12 Dec 2013 13:56:28 +0900
parents
children 54457678186b
comparison
equal deleted inserted replaced
-1:000000000000 0:95c75e76d11b
1 ; RUN: llc < %s -march=thumb | FileCheck %s -check-prefix=V5
2 ; RUN: llc < %s -march=thumb -mattr=+v6 | FileCheck %s -check-prefix=V6
3
4 ; rdar://7176514
5
6 define i32 @test1(i8* %t1) nounwind {
7 ; V5: ldrb
8
9 ; V6: ldrb
10 %tmp.u = load i8* %t1
11 %tmp1.s = zext i8 %tmp.u to i32
12 ret i32 %tmp1.s
13 }
14
15 define i32 @test2(i16* %t1) nounwind {
16 ; V5: ldrh
17
18 ; V6: ldrh
19 %tmp.u = load i16* %t1
20 %tmp1.s = zext i16 %tmp.u to i32
21 ret i32 %tmp1.s
22 }
23
24 define i32 @test3(i8* %t0) nounwind {
25 ; V5: ldrb
26 ; V5: lsls
27 ; V5: asrs
28
29 ; V6: ldrb
30 ; V6: sxtb
31 %tmp.s = load i8* %t0
32 %tmp1.s = sext i8 %tmp.s to i32
33 ret i32 %tmp1.s
34 }
35
36 define i32 @test4(i16* %t0) nounwind {
37 ; V5: ldrh
38 ; V5: lsls
39 ; V5: asrs
40
41 ; V6: ldrh
42 ; V6: sxth
43 %tmp.s = load i16* %t0
44 %tmp1.s = sext i16 %tmp.s to i32
45 ret i32 %tmp1.s
46 }
47
48 define i32 @test5() nounwind {
49 ; V5: movs r0, #0
50 ; V5: ldrsh
51
52 ; V6: movs r0, #0
53 ; V6: ldrsh
54 %tmp.s = load i16* null
55 %tmp1.s = sext i16 %tmp.s to i32
56 ret i32 %tmp1.s
57 }