brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.8 KiB · 5a842c4 Raw
143 lines · plain
1# RUN: llc -mtriple=powerpc64le-linux-gnu -stop-after ppc-pre-emit-peephole %s -o - -verify-machineinstrs | FileCheck %s2 3---4name: test15# The cmp instr is optimized with the record form.6tracksRegLiveness: true7body:             |8  bb.0.entry:9    successors: %bb.1(0x30000000), %bb.2(0x50000000)10    liveins: $x3, $x411    renamable $x3 = OR8 killed renamable $x3, killed renamable $x412    renamable $cr0 = CMPDI renamable $x3, 0, implicit killed $x313    ; CHECK-LABEL: name: test114    ; CHECK: renamable $x3 = OR8_rec killed renamable $x3, killed renamable $x4, implicit-def $cr015    ; CHECK-NOT: CMPDI16    BCC 68, killed renamable $cr0, %bb.217 18  bb.1:19    $x3 = LI8 10220    BLR8 implicit $lr8, implicit $rm, implicit $x321 22  bb.2:23    $x3 = LI8 11624    BLR8 implicit $lr8, implicit $rm, implicit $x325...26 27---28name: test229# The imm of the comparison instr isn't 0.30tracksRegLiveness: true31body:             |32  bb.0.entry:33    successors: %bb.1(0x30000000), %bb.2(0x50000000)34    liveins: $x3, $x435    renamable $x3 = OR8 killed renamable $x3, killed renamable $x436    renamable $cr0 = CMPDI renamable $x3, 2, implicit killed $x337    ; CHECK-LABEL: name: test238    ; CHECK: CMPDI39    BCC 68, killed renamable $cr0, %bb.240 41  bb.1:42    $x3 = LI8 10243    BLR8 implicit $lr8, implicit $rm, implicit $x344 45  bb.2:46    $x3 = LI8 11647    BLR8 implicit $lr8, implicit $rm, implicit $x348...49 50---51name: test352# The comparison instr has a implicit def.53tracksRegLiveness: true54body:             |55  bb.0.entry:56    successors: %bb.1(0x30000000), %bb.2(0x50000000)57    liveins: $x3, $x458    renamable $x3 = OR8 killed renamable $x3, killed renamable $x459    renamable $cr0 = CMPDI renamable $x3, 0, implicit-def $x360    ; CHECK-LABEL: name: test361    ; CHECK: CMPDI62    BCC 68, killed renamable $cr0, %bb.263 64  bb.1:65    $x3 = LI8 10266    BLR8 implicit $lr8, implicit $rm, implicit $x367 68  bb.2:69    $x3 = LI8 11670    BLR8 implicit $lr8, implicit $rm, implicit $x371...72 73---74name: test475# There is another use for cr0 between OR8 instr and CMPWI instr.76tracksRegLiveness: true77body:             |78  bb.0.entry:79    successors: %bb.1(0x30000000), %bb.2(0x50000000)80    liveins: $x3, $x4, $cr081    renamable $x3 = OR8 killed renamable $x3, killed renamable $x482    renamable $cr1 = MCRF killed $cr0, implicit $x383    renamable $cr0 = CMPDI renamable $x3, 0, implicit killed $x3, implicit $cr184    ; CHECK-LABEL: name: test485    ; CHECK: CMPDI86    BCC 68, killed renamable $cr0, %bb.287 88  bb.1:89    $x3 = LI8 10290    BLR8 implicit $lr8, implicit $rm, implicit $x391 92  bb.2:93    $x3 = LI8 11694    BLR8 implicit $lr8, implicit $rm, implicit $x395...96 97---98name: test599# There is another def for cr0 between OR8 instr and CMPWI instr.100tracksRegLiveness: true101body:             |102  bb.0.entry:103    successors: %bb.1(0x30000000), %bb.2(0x50000000)104    liveins: $x3, $x4105    renamable $x3 = OR8 killed renamable $x3, renamable $x4106    renamable $cr1 = CMPD renamable $x3, renamable $x4, implicit-def $cr0107    renamable $cr0 = CMPDI renamable $x3, 0, implicit killed $x3, implicit $cr1108    ; CHECK-LABEL: name: test5109    ; CHECK: CMPDI110    BCC 68, killed renamable $cr0, %bb.2111 112  bb.1:113    $x3 = LI8 102114    BLR8 implicit $lr8, implicit $rm, implicit $x3115 116  bb.2:117    $x3 = LI8 116118    BLR8 implicit $lr8, implicit $rm, implicit $x3119...120 121---122name: test6123# The SrcReg isn't CR0.124tracksRegLiveness: true125body:             |126  bb.0.entry:127    successors: %bb.1(0x30000000), %bb.2(0x50000000)128    liveins: $x3, $x4129    renamable $x3 = OR8 killed renamable $x3, killed renamable $x4130    renamable $cr1 = CMPDI renamable $x3, 0, implicit killed $x3131    ; CHECK-LABEL: name: test6132    ; CHECK: CMPDI133    BCC 68, killed renamable $cr1, %bb.2134 135  bb.1:136    $x3 = LI8 102137    BLR8 implicit $lr8, implicit $rm, implicit $x3138 139  bb.2:140    $x3 = LI8 116141    BLR8 implicit $lr8, implicit $rm, implicit $x3142...143