brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 5f33be0 Raw
48 lines · plain
1# NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py UTC_ARGS: --version 42# RUN: llc -mtriple=x86_64-pc-linux-gnu -run-pass=register-coalescer -verify-coalescing -o - %s | FileCheck %s3 4# Check for "Live range continues after dead def flag".5 6# There are 2 copies of undef, but the registers also appear to be7# live due to block live outs, and thus were not deleted as8# eliminateUndefCopy only considered the live range, and not the undef9# flag.10#11# removePartialRedundancy would move the COPY undef %0 in bb.1 to12# bb.0.  The live range of %1 would then be extended to be live out of13# %bb.1 for the backedge phi. This would then fail the verifier, since14# the dead flag was no longer valid. This was fixed by directly15# considering the undef flag to avoid considering this special case.16 17---18name: partial_redundancy_coalesce_undef_copy_live_out19tracksRegLiveness: true20body:             |21  ; CHECK-LABEL: name: partial_redundancy_coalesce_undef_copy_live_out22  ; CHECK: bb.0:23  ; CHECK-NEXT:   successors: %bb.1(0x80000000)24  ; CHECK-NEXT:   liveins: $rdi25  ; CHECK-NEXT: {{  $}}26  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gr32 = COPY $rdi27  ; CHECK-NEXT: {{  $}}28  ; CHECK-NEXT: bb.1:29  ; CHECK-NEXT:   successors: %bb.1(0x80000000)30  ; CHECK-NEXT: {{  $}}31  ; CHECK-NEXT:   dead [[XOR32ri:%[0-9]+]]:gr32 = XOR32ri undef [[XOR32ri]], 1, implicit-def dead $eflags32  ; CHECK-NEXT:   dead [[MOV32rr:%[0-9]+]]:gr32 = MOV32rr [[COPY]]33  ; CHECK-NEXT:   [[COPY:%[0-9]+]]:gr32 = IMPLICIT_DEF34  ; CHECK-NEXT:   JMP_1 %bb.135  bb.0:36    liveins: $rdi37 38    %0:gr32 = COPY $rdi39 40  bb.1:41    %1:gr32 = COPY undef %042    dead %1:gr32 = XOR32ri %1, 1, implicit-def dead $eflags43    dead %2:gr32 = MOV32rr killed %044    %0:gr32 = COPY killed undef %145    JMP_1 %bb.146 47...48