brintos

brintos / llvm-project-archived public Read only

0
0
Text · 3.4 KiB · 326f268 Raw
63 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_test_checks.py2; RUN: opt < %s -passes=memcpyopt -S -verify-memoryssa | FileCheck %s3 4target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"5 6; Verify that we don't combine nontemporal stores into memset calls.7 8define void @nontemporal_stores_1(ptr nocapture %dst) {9; CHECK-LABEL: @nontemporal_stores_1(10; CHECK-NEXT:  entry:11; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[DST:%.*]], align 16, !nontemporal !012; CHECK-NEXT:    [[PTR1:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 113; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR1]], align 16, !nontemporal !014; CHECK-NEXT:    [[PTR2:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 215; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR2]], align 16, !nontemporal !016; CHECK-NEXT:    [[PTR3:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 317; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR3]], align 16, !nontemporal !018; CHECK-NEXT:    [[PTR4:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 419; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR4]], align 16, !nontemporal !020; CHECK-NEXT:    [[PTR5:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 521; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR5]], align 16, !nontemporal !022; CHECK-NEXT:    [[PTR6:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 623; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR6]], align 16, !nontemporal !024; CHECK-NEXT:    [[PTR7:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 725; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR7]], align 16, !nontemporal !026; CHECK-NEXT:    ret void27;28entry:29  store <4 x float> zeroinitializer, ptr %dst, align 16, !nontemporal !030  %ptr1 = getelementptr inbounds <4 x float>, ptr %dst, i64 131  store <4 x float> zeroinitializer, ptr %ptr1, align 16, !nontemporal !032  %ptr2 = getelementptr inbounds <4 x float>, ptr %dst, i64 233  store <4 x float> zeroinitializer, ptr %ptr2, align 16, !nontemporal !034  %ptr3 = getelementptr inbounds <4 x float>, ptr %dst, i64 335  store <4 x float> zeroinitializer, ptr %ptr3, align 16, !nontemporal !036  %ptr4 = getelementptr inbounds <4 x float>, ptr %dst, i64 437  store <4 x float> zeroinitializer, ptr %ptr4, align 16, !nontemporal !038  %ptr5 = getelementptr inbounds <4 x float>, ptr %dst, i64 539  store <4 x float> zeroinitializer, ptr %ptr5, align 16, !nontemporal !040  %ptr6 = getelementptr inbounds <4 x float>, ptr %dst, i64 641  store <4 x float> zeroinitializer, ptr %ptr6, align 16, !nontemporal !042  %ptr7 = getelementptr inbounds <4 x float>, ptr %dst, i64 743  store <4 x float> zeroinitializer, ptr %ptr7, align 16, !nontemporal !044  ret void45}46 47define void @nontemporal_stores_2(ptr nocapture %dst) {48; CHECK-LABEL: @nontemporal_stores_2(49; CHECK-NEXT:  entry:50; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[DST:%.*]], align 16, !nontemporal !051; CHECK-NEXT:    [[PTR1:%.*]] = getelementptr inbounds <4 x float>, ptr [[DST]], i64 152; CHECK-NEXT:    store <4 x float> zeroinitializer, ptr [[PTR1]], align 16, !nontemporal !053; CHECK-NEXT:    ret void54;55entry:56  store <4 x float> zeroinitializer, ptr %dst, align 16, !nontemporal !057  %ptr1 = getelementptr inbounds <4 x float>, ptr %dst, i64 158  store <4 x float> zeroinitializer, ptr %ptr1, align 16, !nontemporal !059  ret void60}61 62!0 = !{i32 1}63