xref: /aosp_15_r20/external/llvm/test/Transforms/ObjCARC/provenance.ll (revision 9880d6810fe72a1726cb53787c6711e909410d58)
1*9880d681SAndroid Build Coastguard Worker; RUN: opt -disable-output -disable-basicaa -pa-eval %s 2>&1 | FileCheck %s
2*9880d681SAndroid Build Coastguard Worker
3*9880d681SAndroid Build Coastguard Worker@"\01l_objc_msgSend_fixup_" = global i8 0
4*9880d681SAndroid Build Coastguard Worker@g1 = global i8 0, section "__OBJC,__message_refs,literal_pointers,no_dead_strip"
5*9880d681SAndroid Build Coastguard Worker@g2 = global i8 0, section "__DATA, __objc_classrefs, regular, no_dead_strip"
6*9880d681SAndroid Build Coastguard Worker@g3 = global i8 0, section "__DATA, __objc_superrefs, regular, no_dead_strip"
7*9880d681SAndroid Build Coastguard Worker@g4 = global i8 0, section "__TEXT,__objc_methname,cstring_literals"
8*9880d681SAndroid Build Coastguard Worker@g5 = global i8 0, section "__TEXT,__cstring,cstring_literals"
9*9880d681SAndroid Build Coastguard Worker
10*9880d681SAndroid Build Coastguard Workerdeclare void @g(i8)
11*9880d681SAndroid Build Coastguard Worker
12*9880d681SAndroid Build Coastguard Workerdefine void @f(i8* %a, i8** %b, i8** %c) {
13*9880d681SAndroid Build Coastguard Worker  %y1 = load i8, i8* %a
14*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %y1)
15*9880d681SAndroid Build Coastguard Worker
16*9880d681SAndroid Build Coastguard Worker  %y2 = load i8*, i8** %b
17*9880d681SAndroid Build Coastguard Worker  %y3 = load i8*, i8** %c
18*9880d681SAndroid Build Coastguard Worker
19*9880d681SAndroid Build Coastguard Worker  %x0 = load i8, i8* @"\01l_objc_msgSend_fixup_"
20*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x0)
21*9880d681SAndroid Build Coastguard Worker
22*9880d681SAndroid Build Coastguard Worker  %x1 = load i8, i8* @g1
23*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x1)
24*9880d681SAndroid Build Coastguard Worker
25*9880d681SAndroid Build Coastguard Worker  %x2 = load i8, i8* @g2
26*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x2)
27*9880d681SAndroid Build Coastguard Worker
28*9880d681SAndroid Build Coastguard Worker  %x3 = load i8, i8* @g3
29*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x3)
30*9880d681SAndroid Build Coastguard Worker
31*9880d681SAndroid Build Coastguard Worker  %x4 = load i8, i8* @g4
32*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x4)
33*9880d681SAndroid Build Coastguard Worker
34*9880d681SAndroid Build Coastguard Worker  %x5 = load i8, i8* @g5
35*9880d681SAndroid Build Coastguard Worker  call void @g(i8 %x5)
36*9880d681SAndroid Build Coastguard Worker  ret void
37*9880d681SAndroid Build Coastguard Worker}
38*9880d681SAndroid Build Coastguard Worker
39*9880d681SAndroid Build Coastguard Worker; CHECK: y1 and y2 are related.
40*9880d681SAndroid Build Coastguard Worker; CHECK: y1 and y3 are related.
41*9880d681SAndroid Build Coastguard Worker; CHECK: y2 and y3 are related.
42*9880d681SAndroid Build Coastguard Worker; CHECK: x0 and y1 are not related.
43*9880d681SAndroid Build Coastguard Worker; CHECK: x0 and y2 are not related.
44*9880d681SAndroid Build Coastguard Worker; CHECK: x0 and y3 are not related.
45*9880d681SAndroid Build Coastguard Worker; CHECK: l_objc_msgSend_fixup_ and y1 are not related.
46*9880d681SAndroid Build Coastguard Worker; CHECK: l_objc_msgSend_fixup_ and y2 are not related.
47*9880d681SAndroid Build Coastguard Worker; CHECK: l_objc_msgSend_fixup_ and y3 are not related.
48*9880d681SAndroid Build Coastguard Worker; CHECK: x1 and y1 are not related.
49*9880d681SAndroid Build Coastguard Worker; CHECK: x2 and y1 are not related.
50*9880d681SAndroid Build Coastguard Worker; CHECK: x3 and y1 are not related.
51*9880d681SAndroid Build Coastguard Worker; CHECK: x4 and y1 are not related.
52*9880d681SAndroid Build Coastguard Worker; CHECK: x5 and y1 are not related.
53