brintos

brintos / llvm-project-archived public Read only

0
0
Text · 2.1 KiB · 97f57fc Raw
88 lines · plain
1# RUN: llc -mtriple=hexagon -run-pass branch-folder %s -o - -verify-machineinstrs | FileCheck %s2 3# Branch folding will perform tail merging of bb.1 and bb.2, and bb.2 will4# become the common tail. The use of R0 in bb.2 is <undef> while the5# corresponding use in bb.1 is not. The common tail will have the <undef>6# flag removed, which will cause R0 to become a live-in to bb.2. The problem7# is that R0 is not live-out from all predecessors of bb.2, namely is not8# live-out from bb.0. To remedy that, the branch folder should add an9# IMPLICIT_DEF to that block.10 11# CHECK-LABEL: name: func012# CHECK-LABEL: bb.0:13# CHECK: $r0 = IMPLICIT_DEF14# CHECK-LABEL: bb.1:15# CHECK-LABEL: bb.2:16# CHECK: liveins: $r017# CHECK: PS_storerhabs 0, $r018# CHECK: PS_jmpret19 20---21name: func022tracksRegLiveness: true23 24body: |25  bb.0:26    liveins: $r3127    successors: %bb.1, %bb.228      J2_jumpt undef $p0, %bb.2, implicit-def $pc29      J2_jump %bb.1, implicit-def $pc30 31  bb.1:32    liveins: $r3133    successors: %bb.334      $r0 = L2_loadruh_io undef $r1, 035      PS_storerhabs 0, killed $r036      J2_jump %bb.3, implicit-def $pc37 38  bb.2:39    liveins: $r3140    successors: %bb.341      PS_storerhabs 0, undef $r042      J2_jump %bb.3, implicit-def $pc43 44  bb.3:45    liveins: $r3146      PS_jmpret killed $r31, implicit-def $pc47...48---49# CHECK-LABEL: name: func150# CHECK-LABEL: bb.1:51# CHECK: $r0 = IMPLICIT_DEF52# CHECK-LABEL: bb.2:53# CHECK-LABEL: bb.3:54# CHECK: liveins: $r055# CHECK: PS_storerhabs 0, killed $r056# CHECK: PS_jmpret57 58name: func159tracksRegLiveness: true60 61body: |62  bb.0:63    liveins: $r3164    successors: %bb.1, %bb.265      J2_jumpt undef $p0, %bb.2, implicit-def $pc66      J2_jump %bb.1, implicit-def $pc67 68  bb.1:69    liveins: $r3170    successors: %bb.371      $r1 = A2_tfrsi 172      PS_storerhabs 0, undef $r073      $r0 = A2_tfrsi 174      J2_jump %bb.3, implicit-def $pc75 76  bb.2:77    liveins: $r3178    successors: %bb.379      $r0 = L2_loadruh_io undef $r1, 080      PS_storerhabs 0, killed $r081      $r0 = A2_tfrsi 182      J2_jump %bb.3, implicit-def $pc83 84  bb.3:85    liveins: $r3186      PS_jmpret killed $r31, implicit undef $r0, implicit-def $pc87...88