1 ; RUN: opt -passes=loop-idiom < %s -S | FileCheck %s
2 ; RUN: opt -aa-pipeline=basic-aa -passes='require<aa>,require<target-ir>,require<scalar-evolution>,require<opt-remark-emit>,loop(loop-idiom)' < %s -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
4 target triple = "x86_64-unknown-linux-gnu"
6 %struct.bigBlock_t = type { [256 x <4 x float>] }
9 ; CHECK-NOT: llvm.memset
10 define void @test(ptr %p) {
14 for.body: ; preds = %entry, %for.body
15 %index.02 = phi i32 [ 0, %entry ], [ %add, %for.body ]
16 %dst.01 = phi ptr [ %p, %entry ], [ %add.ptr2, %for.body ]
17 store <4 x float> zeroinitializer, ptr %dst.01, align 16, !nontemporal !0
18 %add.ptr1 = getelementptr inbounds float, ptr %dst.01, i64 4
19 store <4 x float> zeroinitializer, ptr %add.ptr1, align 16, !nontemporal !0
20 %add.ptr2 = getelementptr inbounds float, ptr %dst.01, i64 8
21 %add = add nuw nsw i32 %index.02, 32
22 %cmp = icmp ult i32 %add, 4096
23 br i1 %cmp, label %for.body, label %for.end
25 for.end: ; preds = %for.body