1 ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
2 ; RUN: opt < %s -S -passes='move-auto-init' -verify-memoryssa | FileCheck %s
4 @__const.foo.buffer = private unnamed_addr constant [8 x i32] [i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766, i32 -1431655766], align 16
6 define void @foo(i32 %x) {
9 ; CHECK-NEXT: [[BUFFER:%.*]] = alloca [8 x i32], align 16
10 ; CHECK-NEXT: [[TOBOOL:%.*]] = icmp ne i32 [[X:%.*]], 0
11 ; CHECK-NEXT: br i1 [[TOBOOL]], label [[IF_THEN:%.*]], label [[IF_END:%.*]]
13 ; CHECK-NEXT: call void @llvm.memcpy.p0.p0.i64(ptr align 16 [[BUFFER]], ptr align 16 @__const.foo.buffer, i64 32, i1 false), !annotation !0
14 ; CHECK-NEXT: call void @dump(ptr [[BUFFER]])
15 ; CHECK-NEXT: br label [[IF_END]]
17 ; CHECK-NEXT: ret void
21 %buffer = alloca [8 x i32], align 16
22 call void @llvm.memcpy.p0.p0.i64(ptr align 16 %buffer, ptr align 16 @__const.foo.buffer, i64 32, i1 false), !annotation !0
23 %tobool = icmp ne i32 %x, 0
24 br i1 %tobool, label %if.then, label %if.end
26 if.then: ; preds = %entry
27 call void @dump(ptr %buffer)
30 if.end: ; preds = %if.then, %entry
36 declare void @llvm.memcpy.p0.p0.i64(ptr noalias nocapture writeonly, ptr noalias nocapture readonly, i64, i1 immarg)
38 declare void @dump(ptr)