1 ; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 2
2 ; RUN: llc -mtriple=m68k < %s | FileCheck %s
4 define void @sext_inreg_i1_to_i8(i1 %val, ptr %ptr) {
5 ; CHECK-LABEL: sext_inreg_i1_to_i8:
6 ; CHECK: .cfi_startproc
7 ; CHECK-NEXT: ; %bb.0: ; %entry
8 ; CHECK-NEXT: move.b (7,%sp), %d0
9 ; CHECK-NEXT: and.b #1, %d0
10 ; CHECK-NEXT: neg.b %d0
11 ; CHECK-NEXT: move.l (8,%sp), %a0
12 ; CHECK-NEXT: move.b %d0, (%a0)
15 %cond = select i1 %val, i8 -1, i8 0
16 store i8 %cond, ptr %ptr
20 define void @sext_inreg_i1_to_i16(i1 %val, ptr %ptr) {
21 ; CHECK-LABEL: sext_inreg_i1_to_i16:
22 ; CHECK: .cfi_startproc
23 ; CHECK-NEXT: ; %bb.0: ; %entry
24 ; CHECK-NEXT: move.b (7,%sp), %d0
25 ; CHECK-NEXT: and.l #255, %d0
26 ; CHECK-NEXT: and.w #1, %d0
27 ; CHECK-NEXT: neg.w %d0
28 ; CHECK-NEXT: move.l (8,%sp), %a0
29 ; CHECK-NEXT: move.w %d0, (%a0)
32 %cond = select i1 %val, i16 -1, i16 0
33 store i16 %cond, ptr %ptr
37 define void @sext_inreg_i1_to_i32(i1 %val, ptr %ptr) {
38 ; CHECK-LABEL: sext_inreg_i1_to_i32:
39 ; CHECK: .cfi_startproc
40 ; CHECK-NEXT: ; %bb.0: ; %entry
41 ; CHECK-NEXT: move.b (7,%sp), %d0
42 ; CHECK-NEXT: and.l #255, %d0
43 ; CHECK-NEXT: and.l #1, %d0
44 ; CHECK-NEXT: neg.l %d0
45 ; CHECK-NEXT: move.l (8,%sp), %a0
46 ; CHECK-NEXT: move.l %d0, (%a0)
49 %cond = select i1 %val, i32 -1, i32 0
50 store i32 %cond, ptr %ptr