blob: 47b94c5a4a83042567d04b95a6d78378068938be [file] [log] [blame]
Saleem Abdulrasool905b6d192014-04-03 23:47:24 +00001; RUN: llc -mtriple=thumb-eabi -mcpu=cortex-m3 %s -o - | FileCheck %s
Eli Friedmana27da982011-08-08 19:49:37 +00002
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}