1 ; RUN: llc < %s -O0 -fast-isel-abort=1 -mtriple=armv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=v7
2 ; RUN: llc < %s -O0 -fast-isel-abort=1 -mtriple=armv7-linux-gnueabi -verify-machineinstrs | FileCheck %s --check-prefix=v7
3 ; RUN: llc < %s -O0 -fast-isel-abort=1 -mtriple=thumbv7-apple-ios -verify-machineinstrs | FileCheck %s --check-prefix=v7
5 ; Can't test pre-ARMv6 Thumb because ARM FastISel currently only supports
6 ; Thumb2. The ARMFastISel::ARMEmitIntExt code should work for Thumb by always
9 ; Note that lsl, asr and lsr in Thumb are all encoded as 16-bit instructions
10 ; and therefore must set flags. {{s?}} below denotes this, instead of
15 define i8 @zext_1_8(i1 %a) nounwind ssp {
22 define i16 @zext_1_16(i1 %a) nounwind ssp {
23 ; v7-LABEL: zext_1_16:
25 %r = zext i1 %a to i16
29 define i32 @zext_1_32(i1 %a) nounwind ssp {
30 ; v7-LABEL: zext_1_32:
32 %r = zext i1 %a to i32
36 define i16 @zext_8_16(i8 %a) nounwind ssp {
37 ; v7-LABEL: zext_8_16:
38 ; v7: and r0, r0, #255
39 %r = zext i8 %a to i16
43 define i32 @zext_8_32(i8 %a) nounwind ssp {
44 ; v7-LABEL: zext_8_32:
45 ; v7: and r0, r0, #255
46 %r = zext i8 %a to i32
50 define i32 @zext_16_32(i16 %a) nounwind ssp {
51 ; v7-LABEL: zext_16_32:
53 %r = zext i16 %a to i32
59 define i8 @sext_1_8(i1 %a) nounwind ssp {
61 ; v7: lsl{{s?}} r0, r0, #31
62 ; v7: asr{{s?}} r0, r0, #31
67 define i16 @sext_1_16(i1 %a) nounwind ssp {
68 ; v7-LABEL: sext_1_16:
69 ; v7: lsl{{s?}} r0, r0, #31
70 ; v7: asr{{s?}} r0, r0, #31
71 %r = sext i1 %a to i16
75 define i32 @sext_1_32(i1 %a) nounwind ssp {
76 ; v7-LABEL: sext_1_32:
77 ; v7: lsl{{s?}} r0, r0, #31
78 ; v7: asr{{s?}} r0, r0, #31
79 %r = sext i1 %a to i32
83 define i16 @sext_8_16(i8 %a) nounwind ssp {
84 ; v7-LABEL: sext_8_16:
86 %r = sext i8 %a to i16
90 define i32 @sext_8_32(i8 %a) nounwind ssp {
91 ; v7-LABEL: sext_8_32:
93 %r = sext i8 %a to i32
97 define i32 @sext_16_32(i16 %a) nounwind ssp {
98 ; v7-LABEL: sext_16_32:
100 %r = sext i16 %a to i32