22
33include "llvm/IR/Intrinsics.td"
44
5- def int_aarch64_set_target_mem0 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrInaccessibleWriteMemOnly< TargetMem0>]>;
5+ def int_aarch64_set_target_mem0 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrWriteMem, IntrWrite<[ TargetMem0] >]>;
66
7- def int_aarch64_get_target_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrInaccessibleReadMemOnly< TargetMem1>]>;
7+ def int_aarch64_get_target_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrReadMem, IntrRead<[ TargetMem1] >]>;
88
9- def int_aarch64_get_target_mem0_set_target_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrInaccessibleReadMemOnly<TargetMem0>, IntrInaccessibleWriteMemOnly<TargetMem1>]>;
9+ def int_aarch64_get_target_mem0_set_target_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrRead<[TargetMem0]>, IntrWrite<[TargetMem1]>]>;
10+
11+ def int_aarch64_get_target_mem1_set_target_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrRead<[TargetMem1]>, IntrWrite<[TargetMem1]>]>;
12+
13+ def int_aarch64_get_target_mem0_mem1 : DefaultAttrsIntrinsic<[], [llvm_i64_ty], [IntrReadMem, IntrRead<[TargetMem0, TargetMem1]>]>;
1014
1115// CHECK: static constexpr unsigned IntrinsicNameOffsetTable[] = {
1216// CHECK-NEXT: 1, // not_intrinsic
13- // CHECK-NEXT: 15, // llvm.aarch64.get.target.mem0.set.target.mem1
14- // CHECK-NEXT: 60, // llvm.aarch64.get.target.mem1
15- // CHECK-NEXT: 89, // llvm.aarch64.set.target.mem0
17+ // CHECK-NEXT: 15, // llvm.aarch64.get.target.mem0.mem1
18+ // CHECK-NEXT: 49, // llvm.aarch64.get.target.mem0.set.target.mem1
19+ // CHECK-NEXT: 94, // llvm.aarch64.get.target.mem1
20+ // CHECK-NEXT: 123, // llvm.aarch64.get.target.mem1.set.target.mem1
21+ // CHECK-NEXT: 168, // llvm.aarch64.set.target.mem0
22+
1623
1724// CHECK: static AttributeSet getIntrinsicFnAttributeSet(LLVMContext &C, unsigned ID) {
1825// CHECK-NEXT: switch (ID) {
1926// CHECK-NEXT: default: llvm_unreachable("Invalid attribute set number");
20- // CHECK-NEXT: case 0:
27+ // CHECK-NEXT: case 0: // llvm.aarch64.get.target.mem0.mem1
2128// CHECK-NEXT: return AttributeSet::get(C, {
2229// CHECK-NEXT: Attribute::get(C, Attribute::NoUnwind),
2330// CHECK-NEXT: Attribute::get(C, Attribute::NoCallback),
2431// CHECK-NEXT: Attribute::get(C, Attribute::NoSync),
2532// CHECK-NEXT: Attribute::get(C, Attribute::NoFree),
2633// CHECK-NEXT: Attribute::get(C, Attribute::WillReturn),
34+ // CHECK-NEXT: // ArgMem: NoModRef, InaccessibleMem: NoModRef, ErrnoMem: NoModRef, Other: NoModRef, TargetMem0: Ref, TargetMem1: Ref
35+ // CHECK-NEXT: Attribute::getWithMemoryEffects(C, MemoryEffects::createFromIntValue(1280)),
36+ // CHECK-NEXT: });
37+ // CHECK-NEXT: case 1: // llvm.aarch64.get.target.mem0.set.target.mem1
38+ // CHECK-NEXT: return AttributeSet::get(C, {
39+ // CHECK-NEXT: Attribute::get(C, Attribute::NoUnwind),
40+ // CHECK-NEXT: Attribute::get(C, Attribute::NoCallback),
41+ // CHECK-NEXT: Attribute::get(C, Attribute::NoSync),
42+ // CHECK-NEXT: Attribute::get(C, Attribute::NoFree),
43+ // CHECK-NEXT: Attribute::get(C, Attribute::WillReturn),
2744// CHECK-NEXT: // ArgMem: NoModRef, InaccessibleMem: NoModRef, ErrnoMem: NoModRef, Other: NoModRef, TargetMem0: Ref, TargetMem1: Mod
2845// CHECK-NEXT: Attribute::getWithMemoryEffects(C, MemoryEffects::createFromIntValue(2304)),
2946// CHECK-NEXT: });
30- // CHECK-NEXT: case 1:
47+ // CHECK-NEXT: case 2: // llvm.aarch64.get.target.mem1
3148// CHECK-NEXT: return AttributeSet::get(C, {
3249// CHECK-NEXT: Attribute::get(C, Attribute::NoUnwind),
3350// CHECK-NEXT: Attribute::get(C, Attribute::NoCallback),
@@ -37,7 +54,17 @@ def int_aarch64_get_target_mem0_set_target_mem1 : DefaultAttrsIntrinsic<[], [l
3754// CHECK-NEXT: // ArgMem: NoModRef, InaccessibleMem: NoModRef, ErrnoMem: NoModRef, Other: NoModRef, TargetMem0: NoModRef, TargetMem1: Ref
3855// CHECK-NEXT: Attribute::getWithMemoryEffects(C, MemoryEffects::createFromIntValue(1024)),
3956// CHECK-NEXT: });
40- // CHECK-NEXT: case 2:
57+ // CHECK-NEXT: case 3: // llvm.aarch64.get.target.mem1.set.target.mem1
58+ // CHECK-NEXT: return AttributeSet::get(C, {
59+ // CHECK-NEXT: Attribute::get(C, Attribute::NoUnwind),
60+ // CHECK-NEXT: Attribute::get(C, Attribute::NoCallback),
61+ // CHECK-NEXT: Attribute::get(C, Attribute::NoSync),
62+ // CHECK-NEXT: Attribute::get(C, Attribute::NoFree),
63+ // CHECK-NEXT: Attribute::get(C, Attribute::WillReturn),
64+ // CHECK-NEXT: // ArgMem: NoModRef, InaccessibleMem: NoModRef, ErrnoMem: NoModRef, Other: NoModRef, TargetMem0: NoModRef, TargetMem1: ModRef
65+ // CHECK-NEXT: Attribute::getWithMemoryEffects(C, MemoryEffects::createFromIntValue(3072)),
66+ // CHECK-NEXT: });
67+ // CHECK-NEXT: case 4: // llvm.aarch64.set.target.mem0
4168// CHECK-NEXT: return AttributeSet::get(C, {
4269// CHECK-NEXT: Attribute::get(C, Attribute::NoUnwind),
4370// CHECK-NEXT: Attribute::get(C, Attribute::NoCallback),
0 commit comments