brintos

brintos / llvm-project-archived public Read only

0
0
Text · 8.3 KiB · 826e306 Raw
215 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 52;; Test hoisting `xxspltib` out of the loop.3 4; RUN: llc -verify-machineinstrs -mtriple powerpc64-ibm-aix-xcoff --mcpu=pwr10 \5; RUN:   %s -o - 2>&1 | FileCheck --check-prefix=AIX64 %s6 7; RUN: llc -verify-machineinstrs -mtriple powerpc-ibm-aix-xcoff --mcpu=pwr10 \8; RUN:   %s -o - 2>&1 | FileCheck --check-prefix=AIX32 %s9 10; RUN: llc -verify-machineinstrs -mtriple powerpc64le-unknown-linux-gnu --mcpu=pwr10 \11; RUN:   %s -o - 2>&1 | FileCheck --check-prefix=LINUX64LE %s12 13define void @_Z3fooPfS_Pi(ptr noalias nocapture noundef %_a, ptr noalias nocapture %In_a, ptr noalias nocapture %n) {14; AIX64-LABEL: _Z3fooPfS_Pi:15; AIX64:       # %bb.0: # %entry16; AIX64-NEXT:    lwz 5, 0(5)17; AIX64-NEXT:    cmpwi 5, 118; AIX64-NEXT:    bltlr 019; AIX64-NEXT:  # %bb.1: # %for.body.preheader20; AIX64-NEXT:    li 6, 021; AIX64-NEXT:    cmplwi 5, 122; AIX64-NEXT:    beq 0, L..BB0_423; AIX64-NEXT:  # %bb.2: # %for.body.preheader.new24; AIX64-NEXT:    rlwinm 6, 5, 0, 1, 3025; AIX64-NEXT:    xxspltib 0, 626; AIX64-NEXT:    addi 9, 4, -827; AIX64-NEXT:    addi 7, 3, -828; AIX64-NEXT:    li 8, 829; AIX64-NEXT:    li 10, 1230; AIX64-NEXT:    li 11, 431; AIX64-NEXT:    addi 6, 6, -232; AIX64-NEXT:    rldicl 6, 6, 63, 133; AIX64-NEXT:    addi 6, 6, 134; AIX64-NEXT:    mtctr 635; AIX64-NEXT:    li 6, 036; AIX64-NEXT:    .align 437; AIX64-NEXT:  L..BB0_3: # %for.body38; AIX64-NEXT:    #39; AIX64-NEXT:    lxvwsx 1, 9, 840; AIX64-NEXT:    addi 6, 6, 241; AIX64-NEXT:    xxland 1, 1, 042; AIX64-NEXT:    xscvspdpn 1, 143; AIX64-NEXT:    stfsu 1, 8(7)44; AIX64-NEXT:    lxvwsx 1, 9, 1045; AIX64-NEXT:    addi 9, 9, 846; AIX64-NEXT:    xxland 1, 1, 047; AIX64-NEXT:    xxsldwi 1, 1, 1, 348; AIX64-NEXT:    stfiwx 1, 7, 1149; AIX64-NEXT:    bdnz L..BB0_350; AIX64-NEXT:  L..BB0_4: # %for.cond.cleanup.loopexit.unr-lcssa51; AIX64-NEXT:    andi. 5, 5, 152; AIX64-NEXT:    bclr 4, 1, 053; AIX64-NEXT:  # %bb.5: # %for.body.epil54; AIX64-NEXT:    sldi 5, 6, 255; AIX64-NEXT:    xxspltib 1, 656; AIX64-NEXT:    lxvwsx 0, 4, 557; AIX64-NEXT:    xxland 0, 0, 158; AIX64-NEXT:    xxsldwi 0, 0, 0, 359; AIX64-NEXT:    stfiwx 0, 3, 560; AIX64-NEXT:    blr61;62; AIX32-LABEL: _Z3fooPfS_Pi:63; AIX32:       # %bb.0: # %entry64; AIX32-NEXT:    lwz 5, 0(5)65; AIX32-NEXT:    cmpwi 5, 166; AIX32-NEXT:    bltlr 067; AIX32-NEXT:  # %bb.1: # %for.body.preheader68; AIX32-NEXT:    li 6, 069; AIX32-NEXT:    beq 0, L..BB0_470; AIX32-NEXT:  # %bb.2: # %for.body.preheader.new71; AIX32-NEXT:    xxspltib 0, 672; AIX32-NEXT:    addi 12, 4, -873; AIX32-NEXT:    addi 8, 3, -874; AIX32-NEXT:    rlwinm 7, 5, 0, 1, 3075; AIX32-NEXT:    li 9, 876; AIX32-NEXT:    li 10, 1277; AIX32-NEXT:    li 11, 078; AIX32-NEXT:    .align 479; AIX32-NEXT:  L..BB0_3: # %for.body80; AIX32-NEXT:    #81; AIX32-NEXT:    lxvwsx 1, 12, 982; AIX32-NEXT:    addic 6, 6, 283; AIX32-NEXT:    addze 11, 1184; AIX32-NEXT:    xor 0, 6, 785; AIX32-NEXT:    or. 0, 0, 1186; AIX32-NEXT:    xxland 1, 1, 087; AIX32-NEXT:    xscvspdpn 1, 188; AIX32-NEXT:    stfsu 1, 8(8)89; AIX32-NEXT:    lxvwsx 1, 12, 1090; AIX32-NEXT:    addi 12, 12, 891; AIX32-NEXT:    xxland 1, 1, 092; AIX32-NEXT:    xscvspdpn 1, 193; AIX32-NEXT:    stfs 1, 4(8)94; AIX32-NEXT:    bne 0, L..BB0_395; AIX32-NEXT:  L..BB0_4: # %for.cond.cleanup.loopexit.unr-lcssa96; AIX32-NEXT:    andi. 5, 5, 197; AIX32-NEXT:    bclr 4, 1, 098; AIX32-NEXT:  # %bb.5: # %for.body.epil99; AIX32-NEXT:    slwi 5, 6, 2100; AIX32-NEXT:    xxspltib 1, 6101; AIX32-NEXT:    lxvwsx 0, 4, 5102; AIX32-NEXT:    xxland 0, 0, 1103; AIX32-NEXT:    xscvspdpn 0, 0104; AIX32-NEXT:    stfsx 0, 3, 5105; AIX32-NEXT:    blr106;107; LINUX64LE-LABEL: _Z3fooPfS_Pi:108; LINUX64LE:       # %bb.0: # %entry109; LINUX64LE-NEXT:    lwz 5, 0(5)110; LINUX64LE-NEXT:    cmpwi 5, 1111; LINUX64LE-NEXT:    bltlr 0112; LINUX64LE-NEXT:  # %bb.1: # %for.body.preheader113; LINUX64LE-NEXT:    li 6, 0114; LINUX64LE-NEXT:    cmplwi 5, 1115; LINUX64LE-NEXT:    beq 0, .LBB0_4116; LINUX64LE-NEXT:  # %bb.2: # %for.body.preheader.new117; LINUX64LE-NEXT:    rlwinm 6, 5, 0, 1, 30118; LINUX64LE-NEXT:    xxspltib 0, 6119; LINUX64LE-NEXT:    addi 8, 4, -8120; LINUX64LE-NEXT:    addi 7, 3, -8121; LINUX64LE-NEXT:    li 9, 8122; LINUX64LE-NEXT:    li 10, 12123; LINUX64LE-NEXT:    li 11, 4124; LINUX64LE-NEXT:    addi 6, 6, -2125; LINUX64LE-NEXT:    rldicl 6, 6, 63, 1126; LINUX64LE-NEXT:    addi 6, 6, 1127; LINUX64LE-NEXT:    mtctr 6128; LINUX64LE-NEXT:    li 6, 0129; LINUX64LE-NEXT:    .p2align 4130; LINUX64LE-NEXT:  .LBB0_3: # %for.body131; LINUX64LE-NEXT:    #132; LINUX64LE-NEXT:    lxvwsx 1, 8, 9133; LINUX64LE-NEXT:    addi 6, 6, 2134; LINUX64LE-NEXT:    xxland 1, 1, 0135; LINUX64LE-NEXT:    xxsldwi 1, 1, 1, 3136; LINUX64LE-NEXT:    xscvspdpn 1, 1137; LINUX64LE-NEXT:    stfsu 1, 8(7)138; LINUX64LE-NEXT:    lxvwsx 1, 8, 10139; LINUX64LE-NEXT:    addi 8, 8, 8140; LINUX64LE-NEXT:    xxland 1, 1, 0141; LINUX64LE-NEXT:    stxvrwx 1, 7, 11142; LINUX64LE-NEXT:    bdnz .LBB0_3143; LINUX64LE-NEXT:  .LBB0_4: # %for.cond.cleanup.loopexit.unr-lcssa144; LINUX64LE-NEXT:    andi. 5, 5, 1145; LINUX64LE-NEXT:    bclr 4, 1, 0146; LINUX64LE-NEXT:  # %bb.5: # %for.body.epil147; LINUX64LE-NEXT:    sldi 5, 6, 2148; LINUX64LE-NEXT:    xxspltib 1, 6149; LINUX64LE-NEXT:    lxvwsx 0, 4, 5150; LINUX64LE-NEXT:    xxland 0, 0, 1151; LINUX64LE-NEXT:    stxvrwx 0, 3, 5152; LINUX64LE-NEXT:    blr153entry:154  %0 = load i32, ptr %n, align 4155  %cmp9 = icmp sgt i32 %0, 0156  br i1 %cmp9, label %for.body.preheader, label %for.cond.cleanup157 158for.body.preheader:159  %wide.trip.count = zext nneg i32 %0 to i64160  %xtraiter = and i64 %wide.trip.count, 1161  %1 = icmp eq i32 %0, 1162  br i1 %1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body.preheader.new163 164for.body.preheader.new:165  %unroll_iter = and i64 %wide.trip.count, 2147483646166  br label %for.body167 168for.cond.cleanup.loopexit.unr-lcssa:169  %indvars.iv.unr = phi i64 [ 0, %for.body.preheader ], [ %indvars.iv.next.1, %for.body ]170  %lcmp.mod.not = icmp eq i64 %xtraiter, 0171  br i1 %lcmp.mod.not, label %for.cond.cleanup, label %for.body.epil172 173for.body.epil:174  %arrayidx.epil = getelementptr inbounds nuw float, ptr %In_a, i64 %indvars.iv.unr175  %2 = load float, ptr %arrayidx.epil, align 4176  %vecins.i.epil = insertelement <4 x float> poison, float %2, i64 0177  %3 = bitcast <4 x float> %vecins.i.epil to <16 x i8>178  %and1.i.epil = and <16 x i8> %3, <i8 6, i8 6, i8 6, i8 6, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison>179  %4 = bitcast <16 x i8> %and1.i.epil to <4 x float>180  %vecext.i.epil = extractelement <4 x float> %4, i64 0181  %arrayidx5.epil = getelementptr inbounds nuw float, ptr %_a, i64 %indvars.iv.unr182  store float %vecext.i.epil, ptr %arrayidx5.epil, align 4183  br label %for.cond.cleanup184 185for.cond.cleanup:186  ret void187 188for.body:189  %indvars.iv = phi i64 [ 0, %for.body.preheader.new ], [ %indvars.iv.next.1, %for.body ]190  %niter = phi i64 [ 0, %for.body.preheader.new ], [ %niter.next.1, %for.body ]191  %arrayidx = getelementptr inbounds nuw float, ptr %In_a, i64 %indvars.iv192  %5 = load float, ptr %arrayidx, align 4193  %vecins.i = insertelement <4 x float> poison, float %5, i64 0194  %6 = bitcast <4 x float> %vecins.i to <16 x i8>195  %and1.i = and <16 x i8> %6, <i8 6, i8 6, i8 6, i8 6, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison>196  %7 = bitcast <16 x i8> %and1.i to <4 x float>197  %vecext.i = extractelement <4 x float> %7, i64 0198  %arrayidx5 = getelementptr inbounds nuw float, ptr %_a, i64 %indvars.iv199  store float %vecext.i, ptr %arrayidx5, align 4200  %indvars.iv.next = or disjoint i64 %indvars.iv, 1201  %arrayidx.1 = getelementptr inbounds nuw float, ptr %In_a, i64 %indvars.iv.next202  %8 = load float, ptr %arrayidx.1, align 4203  %vecins.i.1 = insertelement <4 x float> poison, float %8, i64 0204  %9 = bitcast <4 x float> %vecins.i.1 to <16 x i8>205  %and1.i.1 = and <16 x i8> %9, <i8 6, i8 6, i8 6, i8 6, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison, i8 poison>206  %10 = bitcast <16 x i8> %and1.i.1 to <4 x float>207  %vecext.i.1 = extractelement <4 x float> %10, i64 0208  %arrayidx5.1 = getelementptr inbounds nuw float, ptr %_a, i64 %indvars.iv.next209  store float %vecext.i.1, ptr %arrayidx5.1, align 4210  %indvars.iv.next.1 = add nuw nsw i64 %indvars.iv, 2211  %niter.next.1 = add i64 %niter, 2212  %niter.ncmp.1 = icmp eq i64 %niter.next.1, %unroll_iter213  br i1 %niter.ncmp.1, label %for.cond.cleanup.loopexit.unr-lcssa, label %for.body214}215