1; RUN: opt -loop-idiom -S < %s | FileCheck %s 2 3target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-unknown-linux-gnu" 5 6define void @test1() { 7entry: 8 br label %for.body.preheader 9 10for.body.preheader: ; preds = %for.cond 11 br label %for.body 12 13for.body: ; preds = %for.body, %for.body.preheader 14 %indvars.iv = phi i32 [ 0, %for.body.preheader ], [ %indvars.iv.next, %for.body ] 15 %add.ptr3 = getelementptr inbounds i32, i32* null, i32 %indvars.iv 16 %add.ptr4 = getelementptr inbounds i32, i32* %add.ptr3, i32 1 17 %0 = load i32, i32* %add.ptr4, align 4 18 store i32 %0, i32* %add.ptr3, align 4 19 %indvars.iv.next = add nsw i32 %indvars.iv, 1 20 %exitcond = icmp ne i32 %indvars.iv.next, 6 21 br i1 %exitcond, label %for.body, label %for.body.preheader 22} 23 24; CHECK-LABEL: define void @test1( 25; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* null, i8* inttoptr (i64 4 to i8*), i64 24, i32 4, i1 false) 26; CHECK-NOT: store 27