1 ; RUN: opt -passes=print-alias-sets -S -o - < %s 2>&1 | FileCheck %s
3 @s = global i8 1, align 1
4 @d = global i8 2, align 1
6 ; CHECK: Alias sets for function 'test_known_size':
7 ; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
8 ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %d, LocationSize::precise(1))
9 define void @test_known_size(ptr noalias %d) {
11 call void @llvm.memset.p0.i64(ptr align 1 %d, i8 0, i64 1, i1 false)
15 ; CHECK: Alias sets for function 'test_unknown_size':
16 ; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
17 ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %d, unknown after)
18 define void @test_unknown_size(ptr noalias %d, i64 %len) {
20 call void @llvm.memset.p0.i64(ptr align 1 %d, i8 0, i64 %len, i1 false)
25 ; CHECK: Alias sets for function 'test_atomic_known_size':
26 ; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
27 ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %d, LocationSize::precise(1))
28 define void @test_atomic_known_size(ptr noalias %d) {
30 call void @llvm.memset.element.unordered.atomic.p0.i32(ptr align 1 %d, i8 0, i64 1, i32 1)
34 ; CHECK: Alias sets for function 'test_atomic_unknown_size':
35 ; CHECK: Alias Set Tracker: 1 alias sets for 1 pointer values.
36 ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %d, unknown after)
37 define void @test_atomic_unknown_size(ptr noalias %d, i64 %len) {
39 call void @llvm.memset.element.unordered.atomic.p0.i32(ptr align 1 %d, i8 0, i64 %len, i32 1)
43 declare void @llvm.memset.p0.i64(ptr %dest, i8 %val,
44 i64 %len, i1 %isvolatile)
45 declare void @llvm.memset.element.unordered.atomic.p0.i32(ptr %dest,