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