1 ; RUN: opt < %s -memcpyopt -S | FileCheck %s
3 target datalayout = "e-m:e-i64:64-i128:128-n32:64-S128"
7 ; CHECK: call void @llvm.memset.p0i8.i64(i8* align 2 %2, i8 0, i64 8, i1 false)
9 define void @foo(i64* nocapture %P) {
11 %0 = bitcast i64* %P to i16*
12 %arrayidx = getelementptr inbounds i16, i16* %0, i64 1
13 %1 = bitcast i16* %arrayidx to i32*
14 %arrayidx1 = getelementptr inbounds i16, i16* %0, i64 3
15 store i16 0, i16* %0, align 2
16 store i32 0, i32* %1, align 4
17 store i16 0, i16* %arrayidx1, align 2