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
4 target datalayout = "e-m:e-i64:64-n32:64"
5 target triple = "powerpc64le-unknown-linux-gnu"
7 @global.6 = external global i32*
9 declare void @barney.88(i1, i32*)
10 declare void @barney.94(i8*, i32)
12 define void @redundancy_on_ppc_only(i1 %arg7) {
13 ; PPC64LE-LABEL: redundancy_on_ppc_only:
14 ; PPC64LE: # %bb.0: # %bb
15 ; PPC64LE-NEXT: mflr 0
16 ; PPC64LE-NEXT: andi. 3, 3, 1
17 ; PPC64LE-NEXT: std 0, 16(1)
18 ; PPC64LE-NEXT: stdu 1, -32(1)
19 ; PPC64LE-NEXT: .cfi_def_cfa_offset 32
20 ; PPC64LE-NEXT: .cfi_offset lr, 16
21 ; PPC64LE-NEXT: li 3, 1
22 ; PPC64LE-NEXT: li 4, 0
23 ; PPC64LE-NEXT: isel 3, 3, 4, 1
24 ; PPC64LE-NEXT: bl barney.88
26 ; PPC64LE-NEXT: addi 1, 1, 32
27 ; PPC64LE-NEXT: ld 0, 16(1)
28 ; PPC64LE-NEXT: mtlr 0
34 call void @barney.88(i1 %arg7, i32* null)
38 define void @redundancy_on_ppc_and_other_targets() {
39 ; PPC64LE-LABEL: redundancy_on_ppc_and_other_targets:
41 ; PPC64LE-NEXT: mflr 0
42 ; PPC64LE-NEXT: std 0, 16(1)
43 ; PPC64LE-NEXT: stdu 1, -32(1)
44 ; PPC64LE-NEXT: .cfi_def_cfa_offset 32
45 ; PPC64LE-NEXT: .cfi_offset lr, 16
46 ; PPC64LE-NEXT: addis 3, 2, .LC0@toc@ha
47 ; PPC64LE-NEXT: ld 3, .LC0@toc@l(3)
48 ; PPC64LE-NEXT: li 4, 0
49 ; PPC64LE-NEXT: std 4, 0(3)
50 ; PPC64LE-NEXT: bl barney.94
52 store i32* null, i32** @global.6
53 call void @barney.94(i8* undef, i32 0)