brintos

brintos / llvm-project-archived public Read only

0
0
Text · 11.6 KiB · 748696e Raw
235 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc -mcpu=pwr9 -verify-machineinstrs -mtriple=powerpc64le-unknown-linux-gnu < %s | FileCheck %s3 4; void foo(ptr data, float d) {5;   long i;6;   for (i = 0; i < 8000; i++)7;     data[i] = d;8; }9;10; This loop will be unrolled by 96 and vectorized on power9.11; icmp for loop iteration index and loop trip count(384) has LSRUse for 'reg({0,+,384})'.12; Make sure above icmp does not impact LSR choose best formulae sets based on 'reg({(192 + %0),+,384})'13 14define void @foo(ptr nocapture %data, float %d) {15; CHECK-LABEL: foo:16; CHECK:       # %bb.0: # %entry17; CHECK-NEXT:    xscvdpspn 0, 118; CHECK-NEXT:    li 5, 8319; CHECK-NEXT:    addi 4, 3, 19220; CHECK-NEXT:    mtctr 521; CHECK-NEXT:    xxspltw 0, 0, 022; CHECK-NEXT:    .p2align 423; CHECK-NEXT:  .LBB0_1: # %vector.body24; CHECK-NEXT:    #25; CHECK-NEXT:    stxv 0, -192(4)26; CHECK-NEXT:    stxv 0, -176(4)27; CHECK-NEXT:    stxv 0, -160(4)28; CHECK-NEXT:    stxv 0, -144(4)29; CHECK-NEXT:    stxv 0, -128(4)30; CHECK-NEXT:    stxv 0, -112(4)31; CHECK-NEXT:    stxv 0, -96(4)32; CHECK-NEXT:    stxv 0, -80(4)33; CHECK-NEXT:    stxv 0, -64(4)34; CHECK-NEXT:    stxv 0, -48(4)35; CHECK-NEXT:    stxv 0, -32(4)36; CHECK-NEXT:    stxv 0, -16(4)37; CHECK-NEXT:    stxv 0, 0(4)38; CHECK-NEXT:    stxv 0, 16(4)39; CHECK-NEXT:    stxv 0, 32(4)40; CHECK-NEXT:    stxv 0, 48(4)41; CHECK-NEXT:    stxv 0, 64(4)42; CHECK-NEXT:    stxv 0, 80(4)43; CHECK-NEXT:    stxv 0, 96(4)44; CHECK-NEXT:    stxv 0, 112(4)45; CHECK-NEXT:    stxv 0, 128(4)46; CHECK-NEXT:    stxv 0, 144(4)47; CHECK-NEXT:    stxv 0, 160(4)48; CHECK-NEXT:    stxv 0, 176(4)49; CHECK-NEXT:    addi 4, 4, 38450; CHECK-NEXT:    bdnz .LBB0_151; CHECK-NEXT:  # %bb.2: # %for.body52; CHECK-NEXT:    stfs 1, 31872(3)53; CHECK-NEXT:    stfs 1, 31876(3)54; CHECK-NEXT:    stfs 1, 31880(3)55; CHECK-NEXT:    stfs 1, 31884(3)56; CHECK-NEXT:    stfs 1, 31888(3)57; CHECK-NEXT:    stfs 1, 31892(3)58; CHECK-NEXT:    stfs 1, 31896(3)59; CHECK-NEXT:    stfs 1, 31900(3)60; CHECK-NEXT:    stfs 1, 31904(3)61; CHECK-NEXT:    stfs 1, 31908(3)62; CHECK-NEXT:    stfs 1, 31912(3)63; CHECK-NEXT:    stfs 1, 31916(3)64; CHECK-NEXT:    stfs 1, 31920(3)65; CHECK-NEXT:    stfs 1, 31924(3)66; CHECK-NEXT:    stfs 1, 31928(3)67; CHECK-NEXT:    stfs 1, 31932(3)68; CHECK-NEXT:    stfs 1, 31936(3)69; CHECK-NEXT:    stfs 1, 31940(3)70; CHECK-NEXT:    stfs 1, 31944(3)71; CHECK-NEXT:    stfs 1, 31948(3)72; CHECK-NEXT:    stfs 1, 31952(3)73; CHECK-NEXT:    stfs 1, 31956(3)74; CHECK-NEXT:    stfs 1, 31960(3)75; CHECK-NEXT:    stfs 1, 31964(3)76; CHECK-NEXT:    stfs 1, 31968(3)77; CHECK-NEXT:    stfs 1, 31972(3)78; CHECK-NEXT:    stfs 1, 31976(3)79; CHECK-NEXT:    stfs 1, 31980(3)80; CHECK-NEXT:    stfs 1, 31984(3)81; CHECK-NEXT:    stfs 1, 31988(3)82; CHECK-NEXT:    stfs 1, 31992(3)83; CHECK-NEXT:    stfs 1, 31996(3)84; CHECK-NEXT:    blr85 86entry:87  %broadcast.splatinsert16 = insertelement <4 x float> undef, float %d, i32 088  %broadcast.splat17 = shufflevector <4 x float> %broadcast.splatinsert16, <4 x float> undef, <4 x i32> zeroinitializer89  %broadcast.splatinsert18 = insertelement <4 x float> undef, float %d, i32 090  %broadcast.splat19 = shufflevector <4 x float> %broadcast.splatinsert18, <4 x float> undef, <4 x i32> zeroinitializer91  %broadcast.splatinsert20 = insertelement <4 x float> undef, float %d, i32 092  %broadcast.splat21 = shufflevector <4 x float> %broadcast.splatinsert20, <4 x float> undef, <4 x i32> zeroinitializer93  %broadcast.splatinsert22 = insertelement <4 x float> undef, float %d, i32 094  %broadcast.splat23 = shufflevector <4 x float> %broadcast.splatinsert22, <4 x float> undef, <4 x i32> zeroinitializer95  %broadcast.splatinsert24 = insertelement <4 x float> undef, float %d, i32 096  %broadcast.splat25 = shufflevector <4 x float> %broadcast.splatinsert24, <4 x float> undef, <4 x i32> zeroinitializer97  %broadcast.splatinsert26 = insertelement <4 x float> undef, float %d, i32 098  %broadcast.splat27 = shufflevector <4 x float> %broadcast.splatinsert26, <4 x float> undef, <4 x i32> zeroinitializer99  %broadcast.splatinsert28 = insertelement <4 x float> undef, float %d, i32 0100  %broadcast.splat29 = shufflevector <4 x float> %broadcast.splatinsert28, <4 x float> undef, <4 x i32> zeroinitializer101  %broadcast.splatinsert30 = insertelement <4 x float> undef, float %d, i32 0102  %broadcast.splat31 = shufflevector <4 x float> %broadcast.splatinsert30, <4 x float> undef, <4 x i32> zeroinitializer103  %broadcast.splatinsert32 = insertelement <4 x float> undef, float %d, i32 0104  %broadcast.splat33 = shufflevector <4 x float> %broadcast.splatinsert32, <4 x float> undef, <4 x i32> zeroinitializer105  %broadcast.splatinsert34 = insertelement <4 x float> undef, float %d, i32 0106  %broadcast.splat35 = shufflevector <4 x float> %broadcast.splatinsert34, <4 x float> undef, <4 x i32> zeroinitializer107  %broadcast.splatinsert36 = insertelement <4 x float> undef, float %d, i32 0108  %broadcast.splat37 = shufflevector <4 x float> %broadcast.splatinsert36, <4 x float> undef, <4 x i32> zeroinitializer109  %broadcast.splatinsert38 = insertelement <4 x float> undef, float %d, i32 0110  %broadcast.splat39 = shufflevector <4 x float> %broadcast.splatinsert38, <4 x float> undef, <4 x i32> zeroinitializer111  br label %vector.body112 113vector.body:                                      ; preds = %vector.body, %entry114  %index = phi i64 [ 0, %entry ], [ %index.next.1, %vector.body ]115  %0 = getelementptr inbounds float, ptr %data, i64 %index116  store <4 x float> %broadcast.splat17, ptr %0, align 4117  %1 = getelementptr inbounds float, ptr %0, i64 4118  store <4 x float> %broadcast.splat19, ptr %1, align 4119  %2 = getelementptr inbounds float, ptr %0, i64 8120  store <4 x float> %broadcast.splat21, ptr %2, align 4121  %3 = getelementptr inbounds float, ptr %0, i64 12122  store <4 x float> %broadcast.splat23, ptr %3, align 4123  %4 = getelementptr inbounds float, ptr %0, i64 16124  store <4 x float> %broadcast.splat25, ptr %4, align 4125  %5 = getelementptr inbounds float, ptr %0, i64 20126  store <4 x float> %broadcast.splat27, ptr %5, align 4127  %6 = getelementptr inbounds float, ptr %0, i64 24128  store <4 x float> %broadcast.splat29, ptr %6, align 4129  %7 = getelementptr inbounds float, ptr %0, i64 28130  store <4 x float> %broadcast.splat31, ptr %7, align 4131  %8 = getelementptr inbounds float, ptr %0, i64 32132  store <4 x float> %broadcast.splat33, ptr %8, align 4133  %9 = getelementptr inbounds float, ptr %0, i64 36134  store <4 x float> %broadcast.splat35, ptr %9, align 4135  %10 = getelementptr inbounds float, ptr %0, i64 40136  store <4 x float> %broadcast.splat37, ptr %10, align 4137  %11 = getelementptr inbounds float, ptr %0, i64 44138  store <4 x float> %broadcast.splat39, ptr %11, align 4139  %index.next = add nuw nsw i64 %index, 48140  %12 = getelementptr inbounds float, ptr %data, i64 %index.next141  store <4 x float> %broadcast.splat17, ptr %12, align 4142  %13 = getelementptr inbounds float, ptr %12, i64 4143  store <4 x float> %broadcast.splat19, ptr %13, align 4144  %14 = getelementptr inbounds float, ptr %12, i64 8145  store <4 x float> %broadcast.splat21, ptr %14, align 4146  %15 = getelementptr inbounds float, ptr %12, i64 12147  store <4 x float> %broadcast.splat23, ptr %15, align 4148  %16 = getelementptr inbounds float, ptr %12, i64 16149  store <4 x float> %broadcast.splat25, ptr %16, align 4150  %17 = getelementptr inbounds float, ptr %12, i64 20151  store <4 x float> %broadcast.splat27, ptr %17, align 4152  %18 = getelementptr inbounds float, ptr %12, i64 24153  store <4 x float> %broadcast.splat29, ptr %18, align 4154  %19 = getelementptr inbounds float, ptr %12, i64 28155  store <4 x float> %broadcast.splat31, ptr %19, align 4156  %20 = getelementptr inbounds float, ptr %12, i64 32157  store <4 x float> %broadcast.splat33, ptr %20, align 4158  %21 = getelementptr inbounds float, ptr %12, i64 36159  store <4 x float> %broadcast.splat35, ptr %21, align 4160  %22 = getelementptr inbounds float, ptr %12, i64 40161  store <4 x float> %broadcast.splat37, ptr %22, align 4162  %23 = getelementptr inbounds float, ptr %12, i64 44163  store <4 x float> %broadcast.splat39, ptr %23, align 4164  %index.next.1 = add nuw nsw i64 %index, 96165  %24 = icmp eq i64 %index.next.1, 7968166  br i1 %24, label %for.body, label %vector.body167 168for.body:                                         ; preds = %vector.body169  %arrayidx = getelementptr inbounds float, ptr %data, i64 7968170  store float %d, ptr %arrayidx, align 4171  %arrayidx.1 = getelementptr inbounds float, ptr %data, i64 7969172  store float %d, ptr %arrayidx.1, align 4173  %arrayidx.2 = getelementptr inbounds float, ptr %data, i64 7970174  store float %d, ptr %arrayidx.2, align 4175  %arrayidx.3 = getelementptr inbounds float, ptr %data, i64 7971176  store float %d, ptr %arrayidx.3, align 4177  %arrayidx.4 = getelementptr inbounds float, ptr %data, i64 7972178  store float %d, ptr %arrayidx.4, align 4179  %arrayidx.5 = getelementptr inbounds float, ptr %data, i64 7973180  store float %d, ptr %arrayidx.5, align 4181  %arrayidx.6 = getelementptr inbounds float, ptr %data, i64 7974182  store float %d, ptr %arrayidx.6, align 4183  %arrayidx.7 = getelementptr inbounds float, ptr %data, i64 7975184  store float %d, ptr %arrayidx.7, align 4185  %arrayidx.8 = getelementptr inbounds float, ptr %data, i64 7976186  store float %d, ptr %arrayidx.8, align 4187  %arrayidx.9 = getelementptr inbounds float, ptr %data, i64 7977188  store float %d, ptr %arrayidx.9, align 4189  %arrayidx.10 = getelementptr inbounds float, ptr %data, i64 7978190  store float %d, ptr %arrayidx.10, align 4191  %arrayidx.11 = getelementptr inbounds float, ptr %data, i64 7979192  store float %d, ptr %arrayidx.11, align 4193  %arrayidx.12 = getelementptr inbounds float, ptr %data, i64 7980194  store float %d, ptr %arrayidx.12, align 4195  %arrayidx.13 = getelementptr inbounds float, ptr %data, i64 7981196  store float %d, ptr %arrayidx.13, align 4197  %arrayidx.14 = getelementptr inbounds float, ptr %data, i64 7982198  store float %d, ptr %arrayidx.14, align 4199  %arrayidx.15 = getelementptr inbounds float, ptr %data, i64 7983200  store float %d, ptr %arrayidx.15, align 4201  %arrayidx.16 = getelementptr inbounds float, ptr %data, i64 7984202  store float %d, ptr %arrayidx.16, align 4203  %arrayidx.17 = getelementptr inbounds float, ptr %data, i64 7985204  store float %d, ptr %arrayidx.17, align 4205  %arrayidx.18 = getelementptr inbounds float, ptr %data, i64 7986206  store float %d, ptr %arrayidx.18, align 4207  %arrayidx.19 = getelementptr inbounds float, ptr %data, i64 7987208  store float %d, ptr %arrayidx.19, align 4209  %arrayidx.20 = getelementptr inbounds float, ptr %data, i64 7988210  store float %d, ptr %arrayidx.20, align 4211  %arrayidx.21 = getelementptr inbounds float, ptr %data, i64 7989212  store float %d, ptr %arrayidx.21, align 4213  %arrayidx.22 = getelementptr inbounds float, ptr %data, i64 7990214  store float %d, ptr %arrayidx.22, align 4215  %arrayidx.23 = getelementptr inbounds float, ptr %data, i64 7991216  store float %d, ptr %arrayidx.23, align 4217  %arrayidx.24 = getelementptr inbounds float, ptr %data, i64 7992218  store float %d, ptr %arrayidx.24, align 4219  %arrayidx.25 = getelementptr inbounds float, ptr %data, i64 7993220  store float %d, ptr %arrayidx.25, align 4221  %arrayidx.26 = getelementptr inbounds float, ptr %data, i64 7994222  store float %d, ptr %arrayidx.26, align 4223  %arrayidx.27 = getelementptr inbounds float, ptr %data, i64 7995224  store float %d, ptr %arrayidx.27, align 4225  %arrayidx.28 = getelementptr inbounds float, ptr %data, i64 7996226  store float %d, ptr %arrayidx.28, align 4227  %arrayidx.29 = getelementptr inbounds float, ptr %data, i64 7997228  store float %d, ptr %arrayidx.29, align 4229  %arrayidx.30 = getelementptr inbounds float, ptr %data, i64 7998230  store float %d, ptr %arrayidx.30, align 4231  %arrayidx.31 = getelementptr inbounds float, ptr %data, i64 7999232  store float %d, ptr %arrayidx.31, align 4233  ret void234}235