1# RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu -start-after \ 2# RUN: virtregrewriter -ppc-asm-full-reg-names -verify-machineinstrs %s \ 3# RUN: -o - | FileCheck %s 4 5--- | 6 ; ModuleID = 'a.ll' 7 source_filename = "a.c" 8 target datalayout = "e-m:e-i64:64-n32:64" 9 target triple = "powerpc64le-unknown-linux-gnu" 10 11 ; Function Attrs: nounwind 12 define void @test(i32 signext %a6, i32 signext %a7, i32 signext %a17) local_unnamed_addr #0 { 13 entry: 14 %cmp27 = icmp slt i32 %a6, %a7 15 %cmp29 = icmp sgt i32 %a6, %a17 16 %or.cond781 = or i1 %cmp27, %cmp29 17 tail call void asm sideeffect "# nothing", "~{cr0},~{cr1},~{cr2},~{cr3},~{cr4},~{cr5},~{cr6},~{cr7},~{memory}"() #1, !srcloc !1 18 br label %if.end326 19 20 if.end326: ; preds = %entry 21 br i1 %or.cond781, label %if.then330, label %if.end331 22 23 if.then330: ; preds = %if.end326 24 unreachable 25 26 if.end331: ; preds = %if.end326 27 ret void 28 } 29 30 ; Function Attrs: nounwind 31 declare void @llvm.stackprotector(i8*, i8**) #1 32 33 attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false" "less-precise-fpmad"="false" "min-legal-vector-width"="0" "frame-pointer"="none" "no-infs-fp-math"="false" "no-jump-tables"="false" "no-nans-fp-math"="false" "no-signed-zeros-fp-math"="false" "no-trapping-math"="false" "stack-protector-buffer-size"="8" "target-cpu"="ppc64le" "target-features"="+altivec,+bpermd,+crypto,+direct-move,+extdiv,+htm,+power8-vector,+vsx,-power9-vector" "unsafe-fp-math"="false" "use-soft-float"="false" } 34 attributes #1 = { nounwind } 35 36 !llvm.ident = !{!0} 37 38 !0 = !{!"clang version 8.0.0 (trunk 349357)"} 39 !1 = !{i32 3373} 40 41... 42--- 43name: test 44alignment: 16 45exposesReturnsTwice: false 46legalized: false 47regBankSelected: false 48selected: false 49failedISel: false 50tracksRegLiveness: true 51hasWinCFI: false 52registers: [] 53liveins: 54 - { reg: '$x3', virtual-reg: '' } 55 - { reg: '$x4', virtual-reg: '' } 56 - { reg: '$x5', virtual-reg: '' } 57frameInfo: 58 isFrameAddressTaken: false 59 isReturnAddressTaken: false 60 hasStackMap: false 61 hasPatchPoint: false 62 stackSize: 0 63 offsetAdjustment: 0 64 maxAlignment: 4 65 adjustsStack: false 66 hasCalls: false 67 stackProtector: '' 68 maxCallFrameSize: 4294967295 69 cvBytesOfCalleeSavedRegisters: 0 70 hasOpaqueSPAdjustment: false 71 hasVAStart: false 72 hasMustTailInVarArgFunc: false 73 localFrameSize: 0 74 savePoint: '' 75 restorePoint: '' 76fixedStack: [] 77stack: 78 - { id: 0, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4, 79 stack-id: default, callee-saved-register: '', callee-saved-restored: true, 80 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 81 - { id: 1, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4, 82 stack-id: default, callee-saved-register: '', callee-saved-restored: true, 83 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 84 - { id: 2, name: '', type: spill-slot, offset: 0, size: 4, alignment: 4, 85 stack-id: default, callee-saved-register: '', callee-saved-restored: true, 86 debug-info-variable: '', debug-info-expression: '', debug-info-location: '' } 87constants: [] 88body: | 89 bb.0.entry: 90 liveins: $x3, $x4, $x5 91 92 renamable $cr0 = CMPW renamable $r3, renamable $r4, implicit $x4 93 renamable $cr1 = CMPW renamable $r3, renamable $r5, implicit $x5, implicit killed $x3 94 renamable $cr5lt = CRNOR renamable $cr0lt, renamable $cr1gt, implicit killed $cr0 95 renamable $cr5gt = COPY renamable $cr1gt, implicit $cr1 96 ; CHECK: crnor 4*cr5+lt, lt, 4*cr1+gt 97 ; CHECK: crmove 4*cr5+gt, 4*cr1+gt 98 SPILL_CRBIT killed renamable $cr5lt, 0, %stack.0 :: (store 4 into %stack.0) 99 renamable $cr1 = CMPW renamable $r4, renamable $r5, implicit killed $x5, implicit killed $x4 100 SPILL_CRBIT killed renamable $cr5gt, 0, %stack.1 :: (store 4 into %stack.1) 101 SPILL_CRBIT killed renamable $cr1gt, 0, %stack.2 :: (store 4 into %stack.2) 102 INLINEASM &"# nothing", 25, 12, implicit-def dead early-clobber $cr0, 12, implicit-def dead early-clobber $cr1, 12, implicit-def dead early-clobber $cr2, 12, implicit-def dead early-clobber $cr3, 12, implicit-def dead early-clobber $cr4, 12, implicit-def dead early-clobber $cr5, 12, implicit-def dead early-clobber $cr6, 12, implicit-def dead early-clobber $cr7, !1 103 BLR8 implicit $lr8, implicit $rm 104 105 bb.1.if.end326: 106 successors: %bb.2(0x00000001), %bb.3(0x7fffffff) 107 108 renamable $cr5lt = RESTORE_CRBIT 0, %stack.0 :: (load 4 from %stack.0) 109 renamable $cr5gt = RESTORE_CRBIT 0, %stack.1 :: (load 4 from %stack.1) 110 renamable $cr5lt = CROR killed renamable $cr5lt, killed renamable $cr5gt 111 BCn killed renamable $cr5lt, %bb.3 112 B %bb.2 113 114 bb.2.if.then330: 115 successors: 116 117 118 bb.3.if.end331: 119 BLR8 implicit $lr8, implicit $rm 120 121... 122