• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1; RUN: llc < %s -march=xcore | FileCheck %s
2define i32 @sext1(i32 %a) {
3	%1 = trunc i32 %a to i1
4	%2 = sext i1 %1 to i32
5	ret i32 %2
6}
7; CHECK-LABEL: sext1:
8; CHECK: sext r0, 1
9
10define i32 @sext2(i32 %a) {
11	%1 = trunc i32 %a to i2
12	%2 = sext i2 %1 to i32
13	ret i32 %2
14}
15; CHECK-LABEL: sext2:
16; CHECK: sext r0, 2
17
18define i32 @sext8(i32 %a) {
19	%1 = trunc i32 %a to i8
20	%2 = sext i8 %1 to i32
21	ret i32 %2
22}
23; CHECK-LABEL: sext8:
24; CHECK: sext r0, 8
25
26define i32 @sext16(i32 %a) {
27	%1 = trunc i32 %a to i16
28	%2 = sext i16 %1 to i32
29	ret i32 %2
30}
31; CHECK-LABEL: sext16:
32; CHECK: sext r0, 16
33