| 1 |
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py |
| 2 |
; RUN: llc -mcpu=pwr9 -O3 < %s | FileCheck %s -check-prefix=PPC64LE |
| 3 |
|
| 4 |
target datalayout = "e-m:e-i64:64-n32:64" |
| 5 |
target triple = "powerpc64le-unknown-linux-gnu" |
| 6 |
|
| 7 |
@global.6 = external global ptr |
| 8 |
|
| 9 |
declare void @barney.88(i1, ptr) |
| 10 |
declare void @barney.94(ptr, i32) |
| 11 |
|
| 12 |
define void @redundancy_on_ppc_only(i1 %arg7) nounwind { |
| 13 |
; PPC64LE-LABEL: redundancy_on_ppc_only: |
| 14 |
; PPC64LE: # %bb.0: # %bb |
| 15 |
; PPC64LE-NEXT: andi. 3, 3, 1 |
| 16 |
; PPC64LE-NEXT: mflr 0 |
| 17 |
; PPC64LE-NEXT: stdu 1, -32(1) |
| 18 |
; PPC64LE-NEXT: li 3, 1 |
| 19 |
; PPC64LE-NEXT: li 4, 0 |
| 20 |
; PPC64LE-NEXT: std 0, 48(1) |
| 21 |
; PPC64LE-NEXT: iselgt 3, 3, 4 |
| 22 |
; PPC64LE-NEXT: bl barney.88 |
| 23 |
; PPC64LE-NEXT: nop |
| 24 |
; PPC64LE-NEXT: addi 1, 1, 32 |
| 25 |
; PPC64LE-NEXT: ld 0, 16(1) |
| 26 |
; PPC64LE-NEXT: mtlr 0 |
| 27 |
; PPC64LE-NEXT: blr |
| 28 |
bb: |
| 29 |
br label %bb10 |
| 30 |
|
| 31 |
bb10: ; preds = %bb |
| 32 |
call void @barney.88(i1 %arg7, ptr null) |
| 33 |
ret void |
| 34 |
} |
| 35 |
|
| 36 |
define void @redundancy_on_ppc_and_other_targets() nounwind { |
| 37 |
; PPC64LE-LABEL: redundancy_on_ppc_and_other_targets: |
| 38 |
; PPC64LE: # %bb.0: |
| 39 |
; PPC64LE-NEXT: mflr 0 |
| 40 |
; PPC64LE-NEXT: stdu 1, -32(1) |
| 41 |
; PPC64LE-NEXT: addis 3, 2, .LC0@toc@ha |
| 42 |
; PPC64LE-NEXT: li 4, 0 |
| 43 |
; PPC64LE-NEXT: std 0, 48(1) |
| 44 |
; PPC64LE-NEXT: ld 3, .LC0@toc@l(3) |
| 45 |
; PPC64LE-NEXT: std 4, 0(3) |
| 46 |
; PPC64LE-NEXT: bl barney.94 |
| 47 |
; PPC64LE-NEXT: nop |
| 48 |
store ptr null, ptr @global.6 |
| 49 |
call void @barney.94(ptr undef, i32 0) |
| 50 |
unreachable |
| 51 |
} |