xref: /aosp_15_r20/external/llvm/test/CodeGen/PowerPC/pr25157-peephole.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: llc -mcpu=pwr8 -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker; Verify peephole simplification of splats and swaps.  Bugpoint-reduced
4*9880d681SAndroid Build Coastguard Worker; test from Eric Schweitz.
5*9880d681SAndroid Build Coastguard Worker
6*9880d681SAndroid Build Coastguard Worker%struct.BSS38.51.4488.9911.14348.16813.20264.24701.28152.31603.35054.39491.44914.45407.46393.46886.47872.49351.49844.50830.51323.52309.53295.53788.54281.55267.55760.59211.61625 = type <{ [28 x i8] }>
7*9880d681SAndroid Build Coastguard Worker%struct_main1_2_.491.4928.10351.14788.17253.20704.25141.28592.32043.35494.39931.45354.45847.46833.47326.48312.49791.50284.51270.51763.52749.53735.54228.54721.55707.56200.59651.61626 = type <{ [64 x i8] }>
8*9880d681SAndroid Build Coastguard Worker
9*9880d681SAndroid Build Coastguard Worker@.BSS38 = external global %struct.BSS38.51.4488.9911.14348.16813.20264.24701.28152.31603.35054.39491.44914.45407.46393.46886.47872.49351.49844.50830.51323.52309.53295.53788.54281.55267.55760.59211.61625, align 32
10*9880d681SAndroid Build Coastguard Worker@_main1_2_ = external global %struct_main1_2_.491.4928.10351.14788.17253.20704.25141.28592.32043.35494.39931.45354.45847.46833.47326.48312.49791.50284.51270.51763.52749.53735.54228.54721.55707.56200.59651.61626, section ".comm", align 16
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerdefine void @aercalc_() {
13*9880d681SAndroid Build Coastguard WorkerL.entry:
14*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2426, label %L.LB38_2911
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard WorkerL.LB38_2911:
17*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2140, label %L.LB38_2640
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard WorkerL.LB38_2640:
20*9880d681SAndroid Build Coastguard Worker  unreachable
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard WorkerL.LB38_2426:
23*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2438, label %L.LB38_2920
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard WorkerL.LB38_2920:
26*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2438, label %L.LB38_2921
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard WorkerL.LB38_2921:
29*9880d681SAndroid Build Coastguard Worker  br label %L.LB38_2140
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard WorkerL.LB38_2140:
32*9880d681SAndroid Build Coastguard Worker  ret void
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard WorkerL.LB38_2438:
35*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2451, label %L.LB38_2935
36*9880d681SAndroid Build Coastguard Worker
37*9880d681SAndroid Build Coastguard WorkerL.LB38_2935:
38*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2451, label %L.LB38_2936
39*9880d681SAndroid Build Coastguard Worker
40*9880d681SAndroid Build Coastguard WorkerL.LB38_2936:
41*9880d681SAndroid Build Coastguard Worker  unreachable
42*9880d681SAndroid Build Coastguard Worker
43*9880d681SAndroid Build Coastguard WorkerL.LB38_2451:
44*9880d681SAndroid Build Coastguard Worker  br i1 undef, label %L.LB38_2452, label %L.LB38_2937
45*9880d681SAndroid Build Coastguard Worker
46*9880d681SAndroid Build Coastguard WorkerL.LB38_2937:
47*9880d681SAndroid Build Coastguard Worker  unreachable
48*9880d681SAndroid Build Coastguard Worker
49*9880d681SAndroid Build Coastguard WorkerL.LB38_2452:
50*9880d681SAndroid Build Coastguard Worker  %0 = load float, float* bitcast (i8* getelementptr inbounds (%struct.BSS38.51.4488.9911.14348.16813.20264.24701.28152.31603.35054.39491.44914.45407.46393.46886.47872.49351.49844.50830.51323.52309.53295.53788.54281.55267.55760.59211.61625, %struct.BSS38.51.4488.9911.14348.16813.20264.24701.28152.31603.35054.39491.44914.45407.46393.46886.47872.49351.49844.50830.51323.52309.53295.53788.54281.55267.55760.59211.61625* @.BSS38, i64 0, i32 0, i64 16) to float*), align 16
51*9880d681SAndroid Build Coastguard Worker  %1 = fpext float %0 to double
52*9880d681SAndroid Build Coastguard Worker  %2 = insertelement <2 x double> undef, double %1, i32 1
53*9880d681SAndroid Build Coastguard Worker  store <2 x double> %2, <2 x double>* bitcast (i8* getelementptr inbounds (%struct_main1_2_.491.4928.10351.14788.17253.20704.25141.28592.32043.35494.39931.45354.45847.46833.47326.48312.49791.50284.51270.51763.52749.53735.54228.54721.55707.56200.59651.61626, %struct_main1_2_.491.4928.10351.14788.17253.20704.25141.28592.32043.35494.39931.45354.45847.46833.47326.48312.49791.50284.51270.51763.52749.53735.54228.54721.55707.56200.59651.61626* @_main1_2_, i64 0, i32 0, i64 32) to <2 x double>*), align 16
54*9880d681SAndroid Build Coastguard Worker  unreachable
55*9880d681SAndroid Build Coastguard Worker}
56*9880d681SAndroid Build Coastguard Worker
57*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: @aercalc_
58*9880d681SAndroid Build Coastguard Worker; CHECK: lxsspx
59*9880d681SAndroid Build Coastguard Worker; CHECK: xxspltd
60*9880d681SAndroid Build Coastguard Worker; CHECK: stxvd2x
61*9880d681SAndroid Build Coastguard Worker; CHECK-NOT: xxswapd
62