1 ; Test that copy alignment for byval arguments is limited by param-tls slot alignment.
3 ; RUN: opt < %s -msan-check-access-address=0 -S -passes=msan 2>&1 | FileCheck \
5 ; RUN: opt < %s -msan -msan-check-access-address=0 -S | FileCheck %s
7 target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
8 target triple = "x86_64-unknown-linux-gnu"
10 %struct.S = type { i64, i64, i64, [8 x i8] }
12 ; CHECK: [[A:%.*]] = bitcast i64* {{.*}} add {{.*}} ptrtoint {{.*}} @__msan_param_tls {{.*}} i64 8)
13 ; CHECK: call void @llvm.memcpy.p0i8.p0i8.i64(i8* align 8 [[A]], i8* align 8 {{.*}}, i64 32, i1 false)
15 define void @Caller() sanitize_memory {
17 %agg.tmp = alloca %struct.S, align 16
18 call void @Callee(i32 1, %struct.S* byval align 16 %agg.tmp)
22 declare void @Callee(i32, %struct.S* byval align 16)