brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.7 KiB · 2b10e4b Raw
60 lines · plain
1# RUN: llc -mtriple=hexagon -run-pass branch-folder -run-pass if-converter -verify-machineinstrs %s -o - | FileCheck %s2 3# The hoisting of common instructions from successors could cause registers4# to no longer be live-in in the successor blocks. The liveness was updated5# to include potential new live-in registres, but not to remove registers6# that were no longer live-in.7# This could cause if-converter to generate incorrect code.8#9# In this testcase, the "r1 = A2_sxth killed r0" was hoisted, and since r010# was killed, it was no longer live-in in either successor. The if-converter11# then created code, where the first predicated instruction has incorrect12# implicit use of r0:13#14# %bb.0:15#     liveins: %r016#         %r1 = A2_sxth killed %r0               ; hoisted, kills r017#         A2_nop implicit-def %P018#         %r0 = C2_cmoveit %P0, 2, implicit %r0 ; predicated A2_tfrsi19#         %r0 = C2_cmoveif killed %P0, 1, implicit %r0 ; predicated A2_tfrsi20#         %r0 = A2_add killed %r0, killed %r121#         J2_jumpr %r31, implicit dead %PC22#23 24# CHECK: $r1 = A2_sxth killed $r025# CHECK: $r0 = C2_cmoveit $p0, 226# CHECK-NOT: implicit-def $r027# CHECK: $r0 = C2_cmoveif killed $p0, 1, implicit killed $r028 29---30name: fred31tracksRegLiveness: true32 33body: |34  bb.0:35    liveins: $r036    successors: %bb.1, %bb.237 38    A2_nop implicit-def $p039    J2_jumpt killed $p0, %bb.2, implicit-def dead $pc40 41  bb.1:42    successors: %bb.343    liveins: $r044    $r1 = A2_sxth killed $r045    $r0 = A2_tfrsi 146    J2_jump %bb.3, implicit-def $pc47 48  bb.2:49    successors: %bb.350    liveins: $r051    $r1 = A2_sxth killed $r052    $r0 = A2_tfrsi 253 54  bb.3:55    liveins: $r0, $r156    $r0 = A2_add killed $r0, killed $r157    J2_jumpr $r31, implicit-def dead $pc58...59 60