92 lines · plain
1# RUN: llc -mtriple=x86_64-unknown-linux-gnu -run-pass=register-coalescer -o - %s2 3# An implicit-def will be added to SUBREG_TO_REG during coalescing4---5name: rematerialize_subreg_to_reg_added_impdef_06tracksRegLiveness: true7body: |8 bb.0:9 successors: %bb.1(0x2aaaaaab), %bb.2(0x55555555)10 liveins: $edi11 12 %0:gr32 = MOV32r0 implicit-def dead $eflags13 %1:gr8 = COPY %0.sub_8bit14 %2:gr64 = SUBREG_TO_REG 0, killed %0, %subreg.sub_32bit15 JCC_1 %bb.2, 5, implicit killed undef $eflags16 17 bb.1:18 %4:gr8 = COPY %119 %5:gr8 = COPY killed undef %120 JMP_1 %bb.521 22 bb.2:23 %6:gr64 = IMPLICIT_DEF24 %2:gr64 = COPY killed %625 %5:gr8 = MOV8ri 126 27 bb.5:28 successors: %bb.6(0x30000000), %bb.7(0x50000000)29 30 TEST8rr killed undef %5, %5, implicit-def $eflags31 JCC_1 %bb.7, 5, implicit killed undef $eflags32 33 bb.6:34 $al = COPY killed %135 RET 0, killed undef $al36 37 bb.7:38 MOV64mr undef $noreg, 1, undef $noreg, 0, undef $noreg, killed %2 :: (store (s64))39 RET 0, killed undef $al40 41...42 43 44# Reduced version of previous with the SUBREG_TO_REG already folded45# away.46#47# The mov32r0 defines a subregister and has an implicit-def of the48# super register. After coalescing, the full register implicit def of49# %2 becomes a different subregister def.50 51---52name: rematerialize_subreg_to_reg_coalesces_to_subreg_impdef53tracksRegLiveness: true54body: |55 bb.0:56 successors: %bb.1(0x2aaaaaab), %bb.2(0x55555555)57 liveins: $edi58 59 undef %2.sub_32bit:gr64_with_sub_8bit = MOV32r0 implicit-def dead $eflags, implicit-def %260 %1:gr8 = COPY %2.sub_8bit61 JCC_1 %bb.2, 5, implicit killed undef $eflags62 63 bb.1:64 successors: %bb.3(0x80000000)65 66 dead %3:gr8 = COPY %167 %4:gr8 = COPY undef %168 JMP_1 %bb.369 70 bb.2:71 successors: %bb.3(0x80000000)72 73 %5:gr64 = IMPLICIT_DEF74 %2:gr64_with_sub_8bit = COPY %575 %4:gr8 = MOV8ri 176 77 bb.3:78 successors: %bb.4(0x30000000), %bb.5(0x50000000)79 80 TEST8rr undef %4, %4, implicit-def $eflags81 JCC_1 %bb.5, 5, implicit killed undef $eflags82 83 bb.4:84 $al = COPY %185 RET 0, killed undef $al86 87 bb.5:88 MOV64mr undef $noreg, 1, undef $noreg, 0, undef $noreg, %2 :: (store (s64))89 RET 0, killed undef $al90 91...92