@@ -74,6 +74,36 @@ entry:
7474 ret void
7575}
7676
77+ ; CHECK: Alias sets for function 'test_runtime':
78+ ; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
79+ ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %a, LocationSize::precise(1))
80+ ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %b, LocationSize::precise(1))
81+ define i1 @test_runtime () local_unnamed_addr {
82+ entry:
83+ %a = alloca i8 , align 1
84+ %b = alloca i8 , align 1
85+ store i8 1 , ptr %a , align 1
86+ %allow = call i1 @llvm.allow.runtime.check (metadata !"test_check" )
87+ store i8 1 , ptr %b , align 1
88+ ret i1 %allow
89+ }
90+
91+ ; CHECK: Alias sets for function 'test_ubsan':
92+ ; CHECK: Alias Set Tracker: 2 alias sets for 2 pointer values.
93+ ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %a, LocationSize::precise(1))
94+ ; CHECK: AliasSet[0x{{[0-9a-f]+}}, 1] must alias, Mod Memory locations: (ptr %b, LocationSize::precise(1))
95+ define i1 @test_ubsan () local_unnamed_addr {
96+ entry:
97+ %a = alloca i8 , align 1
98+ %b = alloca i8 , align 1
99+ store i8 1 , ptr %a , align 1
100+ %allow = call i1 @llvm.allow.ubsan.check (i8 7 )
101+ store i8 1 , ptr %b , align 1
102+ ret i1 %allow
103+ }
104+
105+ declare i1 @llvm.allow.ubsan.check (i8 )
106+ declare i1 @llvm.allow.runtime.check (metadata )
77107declare void @llvm.assume (i1 )
78108declare void @llvm.experimental.guard (i1 , ...)
79109declare void @llvm.experimental.noalias.scope.decl (metadata )
0 commit comments