1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 2
2 # RUN: llc -mtriple=i386-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=X86-32
3 # RUN: llc -mtriple=x86_64-linux-gnu -run-pass=legalizer %s -o - | FileCheck %s --check-prefix=X86-64
12 ; X86-32-LABEL: name: test_zext12
13 ; X86-32: [[DEF:%[0-9]+]]:_(s12) = IMPLICIT_DEF
14 ; X86-32-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[DEF]](s12)
15 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[ZEXT]](s32)
16 ; X86-32-NEXT: RET 0, implicit [[COPY]](s32)
17 ; X86-64-LABEL: name: test_zext12
18 ; X86-64: [[DEF:%[0-9]+]]:_(s12) = IMPLICIT_DEF
19 ; X86-64-NEXT: [[ZEXT:%[0-9]+]]:_(s32) = G_ZEXT [[DEF]](s12)
20 ; X86-64-NEXT: [[COPY:%[0-9]+]]:_(s32) = COPY [[ZEXT]](s32)
21 ; X86-64-NEXT: RET 0, implicit [[COPY]](s32)
22 %0:_(s12) = IMPLICIT_DEF
24 %2:_(s32) = COPY %1(s32)
32 ; X86-32-LABEL: name: test_sext16b
33 ; X86-32: [[DEF:%[0-9]+]]:_(s16) = IMPLICIT_DEF
34 ; X86-32-NEXT: [[C:%[0-9]+]]:_(s16) = G_CONSTANT i16 0
35 ; X86-32-NEXT: [[MV:%[0-9]+]]:_(s32) = G_MERGE_VALUES [[DEF]](s16), [[C]](s16)
36 ; X86-32-NEXT: [[C1:%[0-9]+]]:_(s32) = G_CONSTANT i32 0
37 ; X86-32-NEXT: [[MV1:%[0-9]+]]:_(s64) = G_MERGE_VALUES [[MV]](s32), [[C1]](s32)
38 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[MV1]](s64)
39 ; X86-32-NEXT: RET 0, implicit [[COPY]](s64)
40 ; X86-64-LABEL: name: test_sext16b
41 ; X86-64: [[DEF:%[0-9]+]]:_(s16) = IMPLICIT_DEF
42 ; X86-64-NEXT: [[ZEXT:%[0-9]+]]:_(s64) = G_ZEXT [[DEF]](s16)
43 ; X86-64-NEXT: [[COPY:%[0-9]+]]:_(s64) = COPY [[ZEXT]](s64)
44 ; X86-64-NEXT: RET 0, implicit [[COPY]](s64)
45 %0:_(s16) = IMPLICIT_DEF
47 %2:_(s64) = COPY %1(s64)
55 ; X86-32-LABEL: name: test_zext18
56 ; X86-32: [[DEF:%[0-9]+]]:_(s8) = IMPLICIT_DEF
57 ; X86-32-NEXT: [[ZEXT:%[0-9]+]]:_(s16) = G_ZEXT [[DEF]](s8)
58 ; X86-32-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY [[ZEXT]](s16)
59 ; X86-32-NEXT: RET 0, implicit [[COPY]](s16)
60 ; X86-64-LABEL: name: test_zext18
61 ; X86-64: [[DEF:%[0-9]+]]:_(s8) = IMPLICIT_DEF
62 ; X86-64-NEXT: [[ZEXT:%[0-9]+]]:_(s16) = G_ZEXT [[DEF]](s8)
63 ; X86-64-NEXT: [[COPY:%[0-9]+]]:_(s16) = COPY [[ZEXT]](s16)
64 ; X86-64-NEXT: RET 0, implicit [[COPY]](s16)
65 %0:_(s8) = IMPLICIT_DEF
67 %2:_(s16) = COPY %1(s16)