• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file tests the scenario: ISEL RX, RX, RX, CR  (X != 0),
2# which is redudant and removed.
3# RUN: llc -ppc-gen-isel=true -run-pass ppc-expand-isel -o - %s | FileCheck %s
4
5--- |
6  target datalayout = "E-m:e-i64:64-n32:64"
7  target triple = "powerpc64-unknown-linux-gnu"
8  define signext i32 @testExpandISEL(i32 signext %i, i32 signext %j) {
9  entry:
10    %cmp = icmp sgt i32 %i, 0
11    %add = add nsw i32 %i, 1
12    %cond = select i1 %cmp, i32 %add, i32 %j
13    ret i32 %cond
14  }
15
16...
17---
18name:            testExpandISEL
19alignment:       2
20exposesReturnsTwice: false
21legalized:       false
22regBankSelected: false
23selected:        false
24tracksRegLiveness: true
25liveins:
26  - { reg: '$x3' }
27frameInfo:
28  isFrameAddressTaken: false
29  isReturnAddressTaken: false
30  hasStackMap:     false
31  hasPatchPoint:   false
32  stackSize:       0
33  offsetAdjustment: 0
34  maxAlignment:    0
35  adjustsStack:    false
36  hasCalls:        false
37  maxCallFrameSize: 0
38  hasOpaqueSPAdjustment: false
39  hasVAStart:      false
40  hasMustTailInVarArgFunc: false
41body:             |
42  bb.0.entry:
43    liveins: $x3
44
45    $r5 = ADDI $r3, 1
46    $cr0 = CMPWI $r3, 0
47    $r3 = ISEL $r3, $r3, $cr0gt
48    $x3 = EXTSW_32_64  $r3
49    ; CHECK: $r5 = ADDI $r3, 1
50    ; CHECK: $cr0 = CMPWI $r3, 0
51    ; CHECK-NOT: $r3 = ISEL $r3, $r3, $cr0gt
52    ; CHECK: $x3 = EXTSW_32_64 $r3
53
54...
55