blob: 792ebef5f9bcb1a306e0912d664b388371a9a9d6 [file] [log] [blame]
Eli Friedmana27da982011-08-08 19:49:37 +00001; RUN: llc < %s -march=thumb -mcpu=cortex-m3 | FileCheck %s
2
3define i32 @test1(i16 zeroext %z) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +00004; CHECK-LABEL: test1:
Eli Friedmana27da982011-08-08 19:49:37 +00005; CHECK: sxth
6 %r = sext i16 %z to i32
7 ret i32 %r
8}
9
10define i32 @test2(i8 zeroext %z) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +000011; CHECK-LABEL: test2:
Eli Friedmana27da982011-08-08 19:49:37 +000012; CHECK: sxtb
13 %r = sext i8 %z to i32
14 ret i32 %r
15}
16
17define i32 @test3(i16 signext %z) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +000018; CHECK-LABEL: test3:
Eli Friedmana27da982011-08-08 19:49:37 +000019; CHECK: uxth
20 %r = zext i16 %z to i32
21 ret i32 %r
22}
23
24define i32 @test4(i8 signext %z) nounwind {
Stephen Linf799e3f2013-07-13 20:38:47 +000025; CHECK-LABEL: test4:
Eli Friedmana27da982011-08-08 19:49:37 +000026; CHECK: uxtb
27 %r = zext i8 %z to i32
28 ret i32 %r
29}