• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# This file tests the scenario: ISEL R0, RX, R0, CR  (X != 0)
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: '$x0' }
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: $x0, $x3
44
45    $r5 = ADDI $r3, 1
46    $cr0 = CMPWI $r3, 0
47    $r0 = ISEL $r5, $r0, $cr0gt
48    ; CHECK: BC $cr0gt, %[[TRUE:bb.[0-9]+]]
49    ; CHECK: B %[[SUCCESSOR:bb.[0-9]+]]
50    ; CHECK: [[TRUE]]
51    ; CHECK: $r0 = ADDI $r5, 0
52    $x3 = EXTSW_32_64 $r0
53
54...
55