1 # RUN: llc -mtriple=powerpc64le-unknown-unknown -start-after=ppc-mi-peepholes \
2 # RUN: -stop-after=ppc-pre-emit-peephole -verify-machineinstrs %s -o - | FileCheck %s
5 source_filename = "a.c"
6 target datalayout = "e-m:e-i64:64-n32:64"
7 target triple = "powerpc64le-unknown-linux-gnu"
9 ; Function Attrs: norecurse nounwind readnone
10 define signext i32 @test(i32 signext %a, i32 signext %b, i32 signext %c) local_unnamed_addr #0 {
12 %cmp = icmp sgt i32 %a, %b
13 %add = add nsw i32 %c, %b
14 %cond = select i1 %cmp, i32 %a, i32 %add
19 !llvm.module.flags = !{!0, !1}
22 !0 = !{i32 1, !"wchar_size", i32 4}
23 !1 = !{i32 7, !"PIC Level", i32 2}
24 !2 = !{!"clang version 8.0.0 (trunk 347251)"}
30 exposesReturnsTwice: false
32 regBankSelected: false
35 tracksRegLiveness: true
39 - { reg: '$x3', virtual-reg: '' }
40 - { reg: '$x4', virtual-reg: '' }
41 - { reg: '$x5', virtual-reg: '' }
43 isFrameAddressTaken: false
44 isReturnAddressTaken: false
54 cvBytesOfCalleeSavedRegisters: 0
55 hasOpaqueSPAdjustment: false
57 hasMustTailInVarArgFunc: false
69 renamable $r5 = nsw ADD4 killed renamable $r5, renamable $r5, implicit $x5
70 renamable $cr0 = CMPW renamable $r3, killed renamable $r4, implicit $x4
72 ; CHECK-NOT: implicit $x4
73 renamable $r3 = ISEL killed renamable $r3, killed renamable $r5, killed renamable $cr0gt, implicit $cr0, implicit $x3
74 renamable $x3 = EXTSW_32_64 killed renamable $r3
75 BLR8 implicit $lr8, implicit $rm, implicit killed $x3