Home | History | Annotate | Download | only in Hexagon
      1 # RUN: llc -march=hexagon -eif-limit=4 -run-pass hexagon-early-if -o - %s | FileCheck %s
      2 # Check that even with the limit of 4 instructions, the block bb.1 is
      3 # if-converted.
      4 
      5 # CHECK-LABEL: bb.0:
      6 # CHECK: %0:intregs = COPY $r0
      7 # CHECK: %1:predregs = C2_cmpeqi %0, 0
      8 # CHECK: %2:intregs = A2_tfrsi 123
      9 # CHECK: DBG_VALUE debug-use %0, debug-use $noreg
     10 # CHECK: DBG_VALUE debug-use %0, debug-use $noreg
     11 # CHECK: DBG_VALUE debug-use %0, debug-use $noreg
     12 # CHECK: DBG_VALUE debug-use %0, debug-use $noreg
     13 # CHECK: DBG_VALUE debug-use %0, debug-use $noreg
     14 # CHECK: %3:intregs = A2_tfrsi 321
     15 # CHECK: %5:intregs = C2_mux %1, %2, %3
     16 
     17 --- |
     18   define void @foo() {
     19     ret void
     20   }
     21   !1 = !DIExpression()
     22 ...
     23 ---
     24 name: foo
     25 tracksRegLiveness: true
     26 registers:
     27   - { id: 0, class: intregs }
     28   - { id: 1, class: predregs }
     29   - { id: 2, class: intregs }
     30   - { id: 3, class: intregs }
     31   - { id: 4, class: intregs }
     32 body:             |
     33   bb.0:
     34     liveins: $r0
     35 
     36     %0 = COPY $r0
     37     %1 = C2_cmpeqi %0, 0
     38     %2 = A2_tfrsi 123
     39     J2_jumpt %1, %bb.2, implicit-def dead $pc
     40     J2_jump %bb.1, implicit-def dead $pc
     41 
     42   bb.1:
     43     DBG_VALUE debug-use %0, debug-use $noreg, !1, !1
     44     DBG_VALUE debug-use %0, debug-use $noreg, !1, !1
     45     DBG_VALUE debug-use %0, debug-use $noreg, !1, !1
     46     DBG_VALUE debug-use %0, debug-use $noreg, !1, !1
     47     DBG_VALUE debug-use %0, debug-use $noreg, !1, !1
     48     %3 = A2_tfrsi 321
     49 
     50   bb.2:
     51     %4 = PHI %2, %bb.0, %3, %bb.1
     52 
     53 ...
     54