[clang] [llvm] [mlir] [polly] [IR] Add alias scope domains with disjoint scopes (PR #218768)
Krzysztof Drewniak via llvm-commits
llvm-commits at lists.llvm.org
Mon Sep 28 21:57:25 PDT 2026
https://github.com/krzysz00 updated https://github.com/llvm/llvm-project/pull/218768
>From 0d2add3b0cb9b6f1558241558b4f606b673fed96 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Thu, 20 Aug 2026 18:43:58 +0000
Subject: [PATCH 1/9] [IR] Add alias scope domains with disjoint scopes
See RFC at
https://discourse.llvm.org/t/rfc-disjoint-scope-alias-scope-noalias-domains/91537
This commit adds support for declaring an alias scope domain disjoint.
Disjoint domains are ones where each scope is implicitly `!noalias`
with each other scope in the domain. This is represented by adding an
`i1` into the scope's domain as the second argument, with `i1 true`
representing disjoint scopes and `i1 false` representing the old
non-disjoint behavior. AutoUpgrade mechanisms have been added to add
in the missing `i1 false` to existing metadata.
This commit updates alias analysis to know about disjoint scopes and
updates the function cloner to also clone the alias domain if it's
disjoint (since, as a herd of LLMs discovered, you don't want the old
IR to be noalias with a clone of itself).
Commits to migrate passes to use disjoint scopes where that's an
option are future PRs.
AI disclosure: Claude did the coding on this one, I looked over it and
wrote this commit message
---
.../CodeGen/LoongArch/lasx/builtin-alias.c | 2 +-
.../arm-v8.2a-neon-intrinsics-generic.c | 144 +++++++++---------
clang/test/CodeGen/arm_neon_intrinsics.c | 108 ++++++-------
.../taskloop_strictmodifier_codegen.cpp | 4 +-
llvm/docs/LangRef.md | 45 +++++-
llvm/include/llvm/Analysis/ScopedNoAliasAA.h | 6 +
llvm/include/llvm/IR/MDBuilder.h | 15 +-
llvm/include/llvm/IR/Metadata.h | 28 ++++
llvm/lib/Analysis/ScopedNoAliasAA.cpp | 63 +++++++-
llvm/lib/Bitcode/Reader/BitcodeReader.cpp | 9 ++
llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 97 ++++++++++++
llvm/lib/Bitcode/Reader/MetadataLoader.h | 5 +
llvm/lib/IR/AutoUpgrade.cpp | 1 +
llvm/lib/IR/MDBuilder.cpp | 20 ++-
llvm/lib/IR/Verifier.cpp | 14 +-
.../InstCombine/InstructionCombining.cpp | 37 ++++-
llvm/lib/Transforms/Utils/CloneFunction.cpp | 16 +-
llvm/test/Analysis/AliasSet/intrinsics.ll | 2 +-
.../Analysis/BasicAA/noalias-scope-decl.ll | 2 +-
.../Analysis/CostModel/X86/free-intrinsics.ll | 2 +-
.../CostModel/free-intrinsics-datalayout.ll | 2 +-
.../CostModel/free-intrinsics-no_info.ll | 2 +-
.../LoopAccessAnalysis/noalias-scope-decl.ll | 4 +-
.../Analysis/MemorySSA/noalias-scope-decl.ll | 2 +-
.../ScopedNoAliasAA/alias-scope-merging.ll | 6 +-
.../Analysis/ScopedNoAliasAA/basic-domains.ll | 4 +-
llvm/test/Analysis/ScopedNoAliasAA/basic.ll | 2 +-
llvm/test/Analysis/ScopedNoAliasAA/basic2.ll | 2 +-
.../ScopedNoAliasAA/disjoint-domains.ll | 71 +++++++++
.../Analysis/ScopedNoAliasAA/fence-modref.ll | 2 +-
llvm/test/Assembler/incomplete-ir-metadata.ll | 4 +-
.../Bitcode/upgrade-alias-scope-domains.ll | 56 +++++++
.../AArch64/GlobalISel/arm64-irtranslator.ll | 2 +-
llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll | 4 +-
.../CodeGen/AArch64/merge-scoped-aa-store.ll | 4 +-
.../CodeGen/AArch64/vector_merge_dep_check.ll | 2 +-
.../AMDGPU/lds-dma-workgroup-release.ll | 2 +-
.../lower-intrinsics-noalias-metadata.ll | 2 +-
llvm/test/CodeGen/AMDGPU/lower-kernargs.ll | 12 +-
...rnel-arguments-noalias-call-no-ptr-args.ll | 8 +-
.../AMDGPU/lower-lds-struct-aa-memcpy.ll | 2 +-
.../AMDGPU/lower-lds-struct-aa-merge.ll | 10 +-
.../CodeGen/AMDGPU/lower-lds-struct-aa.ll | 4 +-
.../AMDGPU/lower-lds-with-alias-scope.ll | 2 +-
.../CodeGen/AMDGPU/lower-lds-with-noalias.ll | 6 +-
.../AMDGPU/lower-module-lds-via-hybrid.ll | 4 +-
.../CodeGen/AMDGPU/lower-noalias-kernargs.ll | 30 ++--
llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll | 4 +-
.../AMDGPU/remove-no-kernel-id-attribute.ll | 4 +-
.../AMDGPU/si-split-load-store-alias-info.ll | 2 +-
.../AMDGPU/target-mem-intrinsic-metadata.ll | 2 +-
llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll | 8 +-
llvm/test/CodeGen/AVR/rust-avr-bug-95.ll | 6 +-
.../isel-expand-unaligned-loads-noindexed.ll | 2 +-
.../CodeGen/Hexagon/swp-conv3x3-nested.ll | 2 +-
.../CodeGen/MIR/AArch64/machine-metadata.mir | 62 ++++----
.../CodeGen/MIR/AMDGPU/machine-metadata.mir | 74 ++++-----
.../test/CodeGen/MIR/X86/machine-metadata.mir | 68 +++++----
llvm/test/CodeGen/MIR/X86/memory-operands.mir | 2 +-
.../CodeGen/PowerPC/non-simple-args-intrin.ll | 2 +-
.../alias-barrier.ll | 2 +-
.../alias-copy-memory.ll | 2 +-
.../alias-domain-order.ll | 2 +-
.../alias-load-store-atomic.ll | 8 +-
.../alias-load-store-struct.ll | 2 +-
.../alias-load-store.ll | 6 +-
.../alias-masked-load-store.ll | 6 +-
.../llvm-intrinsics/noalias-scope-decl.ll | 2 +-
.../test/CodeGen/SystemZ/subregliveness-01.ll | 2 +-
.../test/CodeGen/X86/dbg-distringtype-uint.ll | 2 +-
llvm/test/CodeGen/X86/memcpy-scoped-aa.ll | 4 +-
llvm/test/CodeGen/X86/pr48727.ll | 2 +-
.../DebugInfo/COFF/fortran-contained-proc.ll | 2 +-
llvm/test/DebugInfo/Generic/sroa-samesize.ll | 2 +-
.../global-sra-struct-part-overlap-segment.ll | 2 +-
.../AggressiveInstCombine/AArch64/or-load.ll | 2 +-
.../AggressiveInstCombine/X86/or-load.ll | 2 +-
.../AggressiveInstCombine/X86/store-merge.ll | 6 +-
.../AtomicExpand/AMDGPU/expand-atomic-i16.ll | 2 +-
.../dfa-jump-threading-transform.ll | 4 +-
.../DeadStoreElimination/merge-stores.ll | 2 +-
.../DeadStoreElimination/scoped-noalias.ll | 2 +-
.../Transforms/EarlyCSE/noalias-scope-decl.ll | 2 +-
llvm/test/Transforms/GVN/noalias.ll | 4 +-
.../Transforms/GVN/rle-coerced-noalias.ll | 4 +-
.../addrec_no_exec_on_every_iteration.ll | 2 +-
.../InferAddressSpaces/AMDGPU/debug-info.ll | 2 +-
.../AMDGPU/mem-intrinsics.ll | 4 +-
.../Inline/AMDGPU/load-intrinsics.ll | 7 +-
.../Transforms/Inline/noalias-calls-always.ll | 4 +-
llvm/test/Transforms/Inline/noalias-calls.ll | 4 +-
llvm/test/Transforms/Inline/noalias-calls2.ll | 68 ++++-----
llvm/test/Transforms/Inline/noalias-cs.ll | 68 ++++-----
.../Inline/noalias-escape-source.ll | 6 +-
llvm/test/Transforms/Inline/noalias.ll | 4 +-
llvm/test/Transforms/Inline/noalias2.ll | 8 +-
llvm/test/Transforms/Inline/noalias3.ll | 2 +-
llvm/test/Transforms/Inline/pr48209.ll | 2 +-
llvm/test/Transforms/Inline/pr50270.ll | 2 +-
.../AMDGPU/memcpy-from-constant.ll | 2 +-
.../Transforms/InstCombine/bitcast-store.ll | 2 +-
.../InstCombine/fold-phi-load-metadata.ll | 2 +-
.../InstCombine/load-combine-metadata.ll | 2 +-
.../InstCombine/loadstore-metadata.ll | 8 +-
.../Transforms/InstCombine/memcpy-to-load.ll | 4 +-
.../noalias-scope-decl-disjoint-domain.ll | 95 ++++++++++++
.../InstCombine/noalias-scope-decl.ll | 2 +-
.../InstCombine/select-masked_load.ll | 2 +-
.../JumpThreading/free_instructions.ll | 2 +-
.../JumpThreading/noalias-scope-decl.ll | 73 ++++++++-
.../Transforms/JumpThreading/thread-loads.ll | 6 +-
.../LICM/AMDGPU/buffer-rsrc-ptrs.ll | 2 +-
llvm/test/Transforms/LICM/dropped-tbaa.ll | 2 +-
llvm/test/Transforms/LICM/hoist-metadata.ll | 2 +-
llvm/test/Transforms/LICM/licm-ci.ll | 2 +-
llvm/test/Transforms/LICM/pr42969.ll | 2 +-
llvm/test/Transforms/LICM/scalar-promote.ll | 4 +-
.../LoadStoreVectorizer/AMDGPU/aa-metadata.ll | 2 +-
.../AMDGPU/fence-noalias-metadata.ll | 4 +-
llvm/test/Transforms/LoopDeletion/noalias.ll | 2 +-
.../LoopDistribute/bounds-expansion-bug.ll | 2 +-
.../LoopDistribute/cross-partition-access.ll | 2 +-
.../Transforms/LoopDistribute/followup.ll | 2 +-
.../Transforms/LoopDistribute/no-reprocess.ll | 2 +-
.../LoopDistribute/non-lcssa-input.ll | 4 +-
.../Transforms/LoopDistribute/outside-use.ll | 30 ++--
llvm/test/Transforms/LoopRotate/noalias.ll | 4 +-
llvm/test/Transforms/LoopUnroll/noalias.ll | 46 +++---
.../peel-loop-noalias-scope-decl.ll | 84 +++++-----
.../LoopVectorize/AArch64/masked_ldst_sme.ll | 2 +-
.../LoopVectorize/AArch64/predicated-costs.ll | 2 +-
.../LoopVectorize/AArch64/store-costs-sve.ll | 4 +-
.../LoopVectorize/AArch64/sve2-histcnt.ll | 4 +-
.../RISCV/blocks-with-dead-instructions.ll | 2 +-
.../LoopVectorize/RISCV/dead-ops-cost.ll | 4 +-
.../LoopVectorize/RISCV/induction-costs.ll | 2 +-
.../RISCV/tail-folding-cast-intrinsics.ll | 20 +--
.../RISCV/tail-folding-intermediate-store.ll | 8 +-
.../truncate-to-minimal-bitwidth-cost.ll | 2 +-
.../RISCV/type-info-cache-evl-crash.ll | 2 +-
.../vf-will-not-generate-any-vector-insts.ll | 2 +-
.../VPlan/AArch64/sve2-histcnt-vplan.ll | 2 +-
.../LoopVectorize/X86/interleave-cost.ll | 2 +-
.../LoopVectorize/dead_instructions.ll | 2 +-
.../interleaved-accesses-metadata.ll | 2 +-
.../test/Transforms/LoopVectorize/metadata.ll | 10 +-
.../Transforms/LoopVectorize/noalias-md.ll | 2 +-
.../noalias-scope-decl-outer-loop.ll | 2 +-
.../LoopVectorize/noalias-scope-decl.ll | 4 +-
.../LoopVectorize/predicate-switch.ll | 4 +-
...te-region-branch-weights-merged-mem-ops.ll | 4 +-
...ime-check-threshold-with-force-metadata.ll | 2 +-
.../scalable-noalias-scope-decl.ll | 4 +-
.../LoopVectorize/select-cmp-multiuse.ll | 6 +-
.../unroll-novec-memcheck-metadata.ll | 2 +-
.../LoopVersioning/add-phi-update-users.ll | 8 +-
.../Transforms/LoopVersioning/crash-36998.ll | 2 +-
.../LoopVersioning/noalias-version-twice.ll | 4 +-
.../test/Transforms/LoopVersioning/noalias.ll | 2 +-
...wrapping-pointer-non-integral-addrspace.ll | 2 +-
.../Transforms/LowerInvoke/lowerinvoke.ll | 2 +-
.../aa-recursion-assertion-failure.ll | 2 +-
llvm/test/Transforms/MemCpyOpt/callslot_aa.ll | 2 +-
.../Transforms/MemCpyOpt/callslot_badaa.ll | 4 +-
.../Transforms/MemCpyOpt/callslot_noalias.ll | 2 +-
.../MemCpyOpt/load-store-to-memcpy.ll | 16 +-
llvm/test/Transforms/MemCpyOpt/memcpy.ll | 2 +-
llvm/test/Transforms/MemCpyOpt/stack-move.ll | 2 +-
.../MergeFunc/mergefunc-preserve-nonnull.ll | 4 +-
.../preserve-store-metadata.ll | 4 +-
llvm/test/Transforms/NewGVN/noalias.ll | 4 +-
.../Transforms/OpenMP/spmdization_guarding.ll | 6 +-
.../AArch64/indvars-vectorization.ll | 2 +-
.../X86/loop-vectorizer-noalias.ll | 2 +-
.../drop-invalid-metadata.ll | 2 +-
.../X86/gathered-shuffle-resized.ll | 4 +-
.../Transforms/SROA/mem-par-metadata-sroa.ll | 2 +-
.../Util/combine-alias-scope-metadata.ll | 2 +-
llvm/test/Transforms/VectorCombine/alias.ll | 25 ++-
llvm/test/Verifier/alias-scope-metadata.ll | 35 +++--
llvm/test/Verifier/noalias_scope_decl.ll | 2 +-
.../Inputs/dot_value_in_metadata_string.ll | 2 +-
.../dot_value_in_metadata_string.ll.expected | 4 +-
llvm/test/tools/llubi/noalias_scope.ll | 2 +-
llvm/unittests/MIR/MachineMetadata.cpp | 6 +-
mlir/lib/Target/LLVMIR/ModuleImport.cpp | 8 +-
mlir/lib/Target/LLVMIR/ModuleTranslation.cpp | 4 +-
.../Target/LLVMIR/Import/import-failure.ll | 2 +-
.../LLVMIR/Import/metadata-alias-scopes.ll | 10 +-
.../Target/LLVMIR/attribute-alias-scopes.mlir | 8 +-
polly/lib/CodeGen/IRBuilder.cpp | 4 +-
polly/test/CodeGen/MemAccess/create_arrays.ll | 2 +-
polly/test/CodeGen/annotated_alias_scopes.ll | 2 +-
.../CodeGen/invariant_load_alias_metadata.ll | 2 +-
polly/test/CodeGen/scev-backedgetaken.ll | 2 +-
195 files changed, 1347 insertions(+), 723 deletions(-)
create mode 100644 llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
create mode 100644 llvm/test/Bitcode/upgrade-alias-scope-domains.ll
create mode 100644 llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
diff --git a/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c b/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
index 16ff84cff5894..a7d218ac8ba15 100644
--- a/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
+++ b/clang/test/CodeGen/LoongArch/lasx/builtin-alias.c
@@ -7297,5 +7297,5 @@ v4i64 insert_128_hi(v4i64 _1, v2i64 _2) { return __lasx_insert_128_hi(_1, _2); }
// CHECK: [[CHAR_TBAA6]] = !{[[META4]], [[META4]], i64 0}
// CHECK: [[META7]] = !{[[META8:![0-9]+]]}
// CHECK: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]], !"__lasx_xvldx: %agg.result"}
-// CHECK: [[META9]] = distinct !{[[META9]], !"__lasx_xvldx"}
+// CHECK: [[META9]] = distinct !{[[META9]], i1 false, !"__lasx_xvldx"}
//.
diff --git a/clang/test/CodeGen/arm-v8.2a-neon-intrinsics-generic.c b/clang/test/CodeGen/arm-v8.2a-neon-intrinsics-generic.c
index 7f12598f71ff8..d8430db209b05 100644
--- a/clang/test/CodeGen/arm-v8.2a-neon-intrinsics-generic.c
+++ b/clang/test/CodeGen/arm-v8.2a-neon-intrinsics-generic.c
@@ -97,7 +97,7 @@ float16x8_t test_vbslq_f16(uint16x8_t a, float16x8_t b, float16x8_t c) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[B_COERCE]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <4 x half> [[TMP0]] to <2 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <4 x half> [[TMP1]] to <2 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META2:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <2 x i32> [[TMP2]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP3]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <4 x half> [[TMP4]] to <4 x i16>
@@ -107,16 +107,16 @@ float16x8_t test_vbslq_f16(uint16x8_t a, float16x8_t b, float16x8_t c) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <8 x i8> [[TMP8]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <8 x i8> [[TMP9]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[VZIP_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 0, i32 4, i32 1, i32 5>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META3]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META2]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <4 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VZIP3_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 2, i32 6, i32 3, i32 7>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VZIP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META3]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VZIP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META2]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vzip_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X4X2_T:%.*]]) align 8 [[AGG_RESULT:%.*]], <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META2:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
@@ -124,10 +124,10 @@ float16x8_t test_vbslq_f16(uint16x8_t a, float16x8_t b, float16x8_t c) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>
// CHECK-FP16-NEXT: [[VZIP_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 0, i32 4, i32 1, i32 5>
-// CHECK-FP16-NEXT: store <4 x half> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META3]]
+// CHECK-FP16-NEXT: store <4 x half> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META2]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <4 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VZIP1_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 2, i32 6, i32 3, i32 7>
-// CHECK-FP16-NEXT: store <4 x half> [[VZIP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META3]]
+// CHECK-FP16-NEXT: store <4 x half> [[VZIP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META2]]
// CHECK-FP16-NEXT: ret void
//
float16x4x2_t test_vzip_f16(float16x4_t a, float16x4_t b) {
@@ -141,7 +141,7 @@ float16x4x2_t test_vzip_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <4 x i32> [[B_COERCE]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[TMP0]] to <4 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <8 x half> [[TMP1]] to <4 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META6:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <4 x i32> [[TMP2]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <4 x i32> [[TMP3]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <8 x half> [[TMP4]] to <8 x i16>
@@ -151,16 +151,16 @@ float16x4x2_t test_vzip_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <16 x i8> [[TMP8]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <16 x i8> [[TMP9]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[VZIP_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META6]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META5]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <8 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VZIP3_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VZIP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META6]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VZIP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META5]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vzipq_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X8X2_T:%.*]]) align 16 [[AGG_RESULT:%.*]], <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META6:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
@@ -168,10 +168,10 @@ float16x4x2_t test_vzip_f16(float16x4_t a, float16x4_t b) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>
// CHECK-FP16-NEXT: [[VZIP_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 0, i32 8, i32 1, i32 9, i32 2, i32 10, i32 3, i32 11>
-// CHECK-FP16-NEXT: store <8 x half> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META6]]
+// CHECK-FP16-NEXT: store <8 x half> [[VZIP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META5]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <8 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VZIP1_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 4, i32 12, i32 5, i32 13, i32 6, i32 14, i32 7, i32 15>
-// CHECK-FP16-NEXT: store <8 x half> [[VZIP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META6]]
+// CHECK-FP16-NEXT: store <8 x half> [[VZIP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META5]]
// CHECK-FP16-NEXT: ret void
//
float16x8x2_t test_vzipq_f16(float16x8_t a, float16x8_t b) {
@@ -185,7 +185,7 @@ float16x8x2_t test_vzipq_f16(float16x8_t a, float16x8_t b) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[B_COERCE]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <4 x half> [[TMP0]] to <2 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <4 x half> [[TMP1]] to <2 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <2 x i32> [[TMP2]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP3]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <4 x half> [[TMP4]] to <4 x i16>
@@ -195,16 +195,16 @@ float16x8x2_t test_vzipq_f16(float16x8_t a, float16x8_t b) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <8 x i8> [[TMP8]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <8 x i8> [[TMP9]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[VUZP_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 0, i32 2, i32 4, i32 6>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META9]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META8]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <4 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VUZP3_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 1, i32 3, i32 5, i32 7>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VUZP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META9]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VUZP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META8]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vuzp_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X4X2_T:%.*]]) align 8 [[AGG_RESULT:%.*]], <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
@@ -212,10 +212,10 @@ float16x8x2_t test_vzipq_f16(float16x8_t a, float16x8_t b) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>
// CHECK-FP16-NEXT: [[VUZP_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 0, i32 2, i32 4, i32 6>
-// CHECK-FP16-NEXT: store <4 x half> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META9]]
+// CHECK-FP16-NEXT: store <4 x half> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META8]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <4 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VUZP1_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 1, i32 3, i32 5, i32 7>
-// CHECK-FP16-NEXT: store <4 x half> [[VUZP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META9]]
+// CHECK-FP16-NEXT: store <4 x half> [[VUZP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META8]]
// CHECK-FP16-NEXT: ret void
//
float16x4x2_t test_vuzp_f16(float16x4_t a, float16x4_t b) {
@@ -229,7 +229,7 @@ float16x4x2_t test_vuzp_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <4 x i32> [[B_COERCE]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[TMP0]] to <4 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <8 x half> [[TMP1]] to <4 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META11:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <4 x i32> [[TMP2]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <4 x i32> [[TMP3]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <8 x half> [[TMP4]] to <8 x i16>
@@ -239,16 +239,16 @@ float16x4x2_t test_vuzp_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <16 x i8> [[TMP8]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <16 x i8> [[TMP9]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[VUZP_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META12]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META11]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <8 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VUZP3_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VUZP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META12]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VUZP3_I]], ptr [[TMP12]], align 4, !alias.scope [[META11]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vuzpq_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X8X2_T:%.*]]) align 16 [[AGG_RESULT:%.*]], <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META11:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
@@ -256,10 +256,10 @@ float16x4x2_t test_vuzp_f16(float16x4_t a, float16x4_t b) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>
// CHECK-FP16-NEXT: [[VUZP_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 8, i32 10, i32 12, i32 14>
-// CHECK-FP16-NEXT: store <8 x half> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META12]]
+// CHECK-FP16-NEXT: store <8 x half> [[VUZP_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META11]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <8 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VUZP1_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 1, i32 3, i32 5, i32 7, i32 9, i32 11, i32 13, i32 15>
-// CHECK-FP16-NEXT: store <8 x half> [[VUZP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META12]]
+// CHECK-FP16-NEXT: store <8 x half> [[VUZP1_I]], ptr [[TMP6]], align 4, !alias.scope [[META11]]
// CHECK-FP16-NEXT: ret void
//
float16x8x2_t test_vuzpq_f16(float16x8_t a, float16x8_t b) {
@@ -273,7 +273,7 @@ float16x8x2_t test_vuzpq_f16(float16x8_t a, float16x8_t b) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <2 x i32> [[B_COERCE]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <4 x half> [[TMP0]] to <2 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <4 x half> [[TMP1]] to <2 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META15:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META14:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <2 x i32> [[TMP2]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <2 x i32> [[TMP3]] to <4 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <4 x half> [[TMP4]] to <4 x i16>
@@ -283,16 +283,16 @@ float16x8x2_t test_vuzpq_f16(float16x8_t a, float16x8_t b) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <8 x i8> [[TMP8]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <8 x i8> [[TMP9]] to <4 x i16>
// CHECK-NOFP16-NEXT: [[VTRN_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 0, i32 4, i32 2, i32 6>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META15]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META14]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <4 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VTRN3_I:%.*]] = shufflevector <4 x i16> [[TMP10]], <4 x i16> [[TMP11]], <4 x i32> <i32 1, i32 5, i32 3, i32 7>
-// CHECK-NOFP16-NEXT: store <4 x i16> [[VTRN3_I]], ptr [[TMP12]], align 4, !alias.scope [[META15]]
+// CHECK-NOFP16-NEXT: store <4 x i16> [[VTRN3_I]], ptr [[TMP12]], align 4, !alias.scope [[META14]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vtrn_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X4X2_T:%.*]]) align 8 [[AGG_RESULT:%.*]], <4 x half> noundef [[A:%.*]], <4 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META15:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META14:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <4 x half> [[A]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <4 x half> [[B]] to <4 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <4 x i16> [[TMP0]] to <8 x i8>
@@ -300,10 +300,10 @@ float16x8x2_t test_vuzpq_f16(float16x8_t a, float16x8_t b) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <8 x i8> [[TMP2]] to <4 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <8 x i8> [[TMP3]] to <4 x half>
// CHECK-FP16-NEXT: [[VTRN_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 0, i32 4, i32 2, i32 6>
-// CHECK-FP16-NEXT: store <4 x half> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META15]]
+// CHECK-FP16-NEXT: store <4 x half> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META14]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <4 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VTRN1_I:%.*]] = shufflevector <4 x half> [[TMP4]], <4 x half> [[TMP5]], <4 x i32> <i32 1, i32 5, i32 3, i32 7>
-// CHECK-FP16-NEXT: store <4 x half> [[VTRN1_I]], ptr [[TMP6]], align 4, !alias.scope [[META15]]
+// CHECK-FP16-NEXT: store <4 x half> [[VTRN1_I]], ptr [[TMP6]], align 4, !alias.scope [[META14]]
// CHECK-FP16-NEXT: ret void
//
float16x4x2_t test_vtrn_f16(float16x4_t a, float16x4_t b) {
@@ -317,7 +317,7 @@ float16x4x2_t test_vtrn_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP1:%.*]] = bitcast <4 x i32> [[B_COERCE]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP2:%.*]] = bitcast <8 x half> [[TMP0]] to <4 x i32>
// CHECK-NOFP16-NEXT: [[TMP3:%.*]] = bitcast <8 x half> [[TMP1]] to <4 x i32>
-// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META18:![0-9]+]])
+// CHECK-NOFP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]])
// CHECK-NOFP16-NEXT: [[TMP4:%.*]] = bitcast <4 x i32> [[TMP2]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP5:%.*]] = bitcast <4 x i32> [[TMP3]] to <8 x half>
// CHECK-NOFP16-NEXT: [[TMP6:%.*]] = bitcast <8 x half> [[TMP4]] to <8 x i16>
@@ -327,16 +327,16 @@ float16x4x2_t test_vtrn_f16(float16x4_t a, float16x4_t b) {
// CHECK-NOFP16-NEXT: [[TMP10:%.*]] = bitcast <16 x i8> [[TMP8]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[TMP11:%.*]] = bitcast <16 x i8> [[TMP9]] to <8 x i16>
// CHECK-NOFP16-NEXT: [[VTRN_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META18]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META17]]
// CHECK-NOFP16-NEXT: [[TMP12:%.*]] = getelementptr inbounds <8 x i16>, ptr [[AGG_RESULT]], i32 1
// CHECK-NOFP16-NEXT: [[VTRN3_I:%.*]] = shufflevector <8 x i16> [[TMP10]], <8 x i16> [[TMP11]], <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
-// CHECK-NOFP16-NEXT: store <8 x i16> [[VTRN3_I]], ptr [[TMP12]], align 4, !alias.scope [[META18]]
+// CHECK-NOFP16-NEXT: store <8 x i16> [[VTRN3_I]], ptr [[TMP12]], align 4, !alias.scope [[META17]]
// CHECK-NOFP16-NEXT: ret void
//
// CHECK-FP16-LABEL: define dso_local void @test_vtrnq_f16(
// CHECK-FP16-SAME: ptr dead_on_unwind noalias writable sret([[STRUCT_FLOAT16X8X2_T:%.*]]) align 16 [[AGG_RESULT:%.*]], <8 x half> noundef [[A:%.*]], <8 x half> noundef [[B:%.*]]) #[[ATTR0]] {
// CHECK-FP16-NEXT: entry:
-// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META18:![0-9]+]])
+// CHECK-FP16-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]])
// CHECK-FP16-NEXT: [[TMP0:%.*]] = bitcast <8 x half> [[A]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP1:%.*]] = bitcast <8 x half> [[B]] to <8 x i16>
// CHECK-FP16-NEXT: [[TMP2:%.*]] = bitcast <8 x i16> [[TMP0]] to <16 x i8>
@@ -344,10 +344,10 @@ float16x4x2_t test_vtrn_f16(float16x4_t a, float16x4_t b) {
// CHECK-FP16-NEXT: [[TMP4:%.*]] = bitcast <16 x i8> [[TMP2]] to <8 x half>
// CHECK-FP16-NEXT: [[TMP5:%.*]] = bitcast <16 x i8> [[TMP3]] to <8 x half>
// CHECK-FP16-NEXT: [[VTRN_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 0, i32 8, i32 2, i32 10, i32 4, i32 12, i32 6, i32 14>
-// CHECK-FP16-NEXT: store <8 x half> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META18]]
+// CHECK-FP16-NEXT: store <8 x half> [[VTRN_I]], ptr [[AGG_RESULT]], align 4, !alias.scope [[META17]]
// CHECK-FP16-NEXT: [[TMP6:%.*]] = getelementptr inbounds <8 x half>, ptr [[AGG_RESULT]], i32 1
// CHECK-FP16-NEXT: [[VTRN1_I:%.*]] = shufflevector <8 x half> [[TMP4]], <8 x half> [[TMP5]], <8 x i32> <i32 1, i32 9, i32 3, i32 11, i32 5, i32 13, i32 7, i32 15>
-// CHECK-FP16-NEXT: store <8 x half> [[VTRN1_I]], ptr [[TMP6]], align 4, !alias.scope [[META18]]
+// CHECK-FP16-NEXT: store <8 x half> [[VTRN1_I]], ptr [[TMP6]], align 4, !alias.scope [[META17]]
// CHECK-FP16-NEXT: ret void
//
float16x8x2_t test_vtrnq_f16(float16x8_t a, float16x8_t b) {
@@ -620,41 +620,41 @@ float16x8_t test_vrev64q_f16(float16x8_t a) {
return vrev64q_f16(a);
}
//.
-// CHECK-NOFP16: [[META3]] = !{[[META4:![0-9]+]]}
-// CHECK-NOFP16: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]], !"vzip_f16: %agg.result"}
-// CHECK-NOFP16: [[META5]] = distinct !{[[META5]], !"vzip_f16"}
-// CHECK-NOFP16: [[META6]] = !{[[META7:![0-9]+]]}
-// CHECK-NOFP16: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"vzipq_f16: %agg.result"}
-// CHECK-NOFP16: [[META8]] = distinct !{[[META8]], !"vzipq_f16"}
-// CHECK-NOFP16: [[META9]] = !{[[META10:![0-9]+]]}
-// CHECK-NOFP16: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"vuzp_f16: %agg.result"}
-// CHECK-NOFP16: [[META11]] = distinct !{[[META11]], !"vuzp_f16"}
-// CHECK-NOFP16: [[META12]] = !{[[META13:![0-9]+]]}
-// CHECK-NOFP16: [[META13]] = distinct !{[[META13]], [[META14:![0-9]+]], !"vuzpq_f16: %agg.result"}
-// CHECK-NOFP16: [[META14]] = distinct !{[[META14]], !"vuzpq_f16"}
-// CHECK-NOFP16: [[META15]] = !{[[META16:![0-9]+]]}
-// CHECK-NOFP16: [[META16]] = distinct !{[[META16]], [[META17:![0-9]+]], !"vtrn_f16: %agg.result"}
-// CHECK-NOFP16: [[META17]] = distinct !{[[META17]], !"vtrn_f16"}
-// CHECK-NOFP16: [[META18]] = !{[[META19:![0-9]+]]}
-// CHECK-NOFP16: [[META19]] = distinct !{[[META19]], [[META20:![0-9]+]], !"vtrnq_f16: %agg.result"}
-// CHECK-NOFP16: [[META20]] = distinct !{[[META20]], !"vtrnq_f16"}
+// CHECK-NOFP16: [[META2]] = !{[[META3:![0-9]+]]}
+// CHECK-NOFP16: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]], !"vzip_f16: %agg.result"}
+// CHECK-NOFP16: [[META4]] = distinct !{[[META4]], i1 false, !"vzip_f16"}
+// CHECK-NOFP16: [[META5]] = !{[[META6:![0-9]+]]}
+// CHECK-NOFP16: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]], !"vzipq_f16: %agg.result"}
+// CHECK-NOFP16: [[META7]] = distinct !{[[META7]], i1 false, !"vzipq_f16"}
+// CHECK-NOFP16: [[META8]] = !{[[META9:![0-9]+]]}
+// CHECK-NOFP16: [[META9]] = distinct !{[[META9]], [[META10:![0-9]+]], !"vuzp_f16: %agg.result"}
+// CHECK-NOFP16: [[META10]] = distinct !{[[META10]], i1 false, !"vuzp_f16"}
+// CHECK-NOFP16: [[META11]] = !{[[META12:![0-9]+]]}
+// CHECK-NOFP16: [[META12]] = distinct !{[[META12]], [[META13:![0-9]+]], !"vuzpq_f16: %agg.result"}
+// CHECK-NOFP16: [[META13]] = distinct !{[[META13]], i1 false, !"vuzpq_f16"}
+// CHECK-NOFP16: [[META14]] = !{[[META15:![0-9]+]]}
+// CHECK-NOFP16: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]], !"vtrn_f16: %agg.result"}
+// CHECK-NOFP16: [[META16]] = distinct !{[[META16]], i1 false, !"vtrn_f16"}
+// CHECK-NOFP16: [[META17]] = !{[[META18:![0-9]+]]}
+// CHECK-NOFP16: [[META18]] = distinct !{[[META18]], [[META19:![0-9]+]], !"vtrnq_f16: %agg.result"}
+// CHECK-NOFP16: [[META19]] = distinct !{[[META19]], i1 false, !"vtrnq_f16"}
//.
-// CHECK-FP16: [[META3]] = !{[[META4:![0-9]+]]}
-// CHECK-FP16: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]], !"vzip_f16: %agg.result"}
-// CHECK-FP16: [[META5]] = distinct !{[[META5]], !"vzip_f16"}
-// CHECK-FP16: [[META6]] = !{[[META7:![0-9]+]]}
-// CHECK-FP16: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"vzipq_f16: %agg.result"}
-// CHECK-FP16: [[META8]] = distinct !{[[META8]], !"vzipq_f16"}
-// CHECK-FP16: [[META9]] = !{[[META10:![0-9]+]]}
-// CHECK-FP16: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"vuzp_f16: %agg.result"}
-// CHECK-FP16: [[META11]] = distinct !{[[META11]], !"vuzp_f16"}
-// CHECK-FP16: [[META12]] = !{[[META13:![0-9]+]]}
-// CHECK-FP16: [[META13]] = distinct !{[[META13]], [[META14:![0-9]+]], !"vuzpq_f16: %agg.result"}
-// CHECK-FP16: [[META14]] = distinct !{[[META14]], !"vuzpq_f16"}
-// CHECK-FP16: [[META15]] = !{[[META16:![0-9]+]]}
-// CHECK-FP16: [[META16]] = distinct !{[[META16]], [[META17:![0-9]+]], !"vtrn_f16: %agg.result"}
-// CHECK-FP16: [[META17]] = distinct !{[[META17]], !"vtrn_f16"}
-// CHECK-FP16: [[META18]] = !{[[META19:![0-9]+]]}
-// CHECK-FP16: [[META19]] = distinct !{[[META19]], [[META20:![0-9]+]], !"vtrnq_f16: %agg.result"}
-// CHECK-FP16: [[META20]] = distinct !{[[META20]], !"vtrnq_f16"}
+// CHECK-FP16: [[META2]] = !{[[META3:![0-9]+]]}
+// CHECK-FP16: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]], !"vzip_f16: %agg.result"}
+// CHECK-FP16: [[META4]] = distinct !{[[META4]], i1 false, !"vzip_f16"}
+// CHECK-FP16: [[META5]] = !{[[META6:![0-9]+]]}
+// CHECK-FP16: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]], !"vzipq_f16: %agg.result"}
+// CHECK-FP16: [[META7]] = distinct !{[[META7]], i1 false, !"vzipq_f16"}
+// CHECK-FP16: [[META8]] = !{[[META9:![0-9]+]]}
+// CHECK-FP16: [[META9]] = distinct !{[[META9]], [[META10:![0-9]+]], !"vuzp_f16: %agg.result"}
+// CHECK-FP16: [[META10]] = distinct !{[[META10]], i1 false, !"vuzp_f16"}
+// CHECK-FP16: [[META11]] = !{[[META12:![0-9]+]]}
+// CHECK-FP16: [[META12]] = distinct !{[[META12]], [[META13:![0-9]+]], !"vuzpq_f16: %agg.result"}
+// CHECK-FP16: [[META13]] = distinct !{[[META13]], i1 false, !"vuzpq_f16"}
+// CHECK-FP16: [[META14]] = !{[[META15:![0-9]+]]}
+// CHECK-FP16: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]], !"vtrn_f16: %agg.result"}
+// CHECK-FP16: [[META16]] = distinct !{[[META16]], i1 false, !"vtrn_f16"}
+// CHECK-FP16: [[META17]] = !{[[META18:![0-9]+]]}
+// CHECK-FP16: [[META18]] = distinct !{[[META18]], [[META19:![0-9]+]], !"vtrnq_f16: %agg.result"}
+// CHECK-FP16: [[META19]] = distinct !{[[META19]], i1 false, !"vtrnq_f16"}
//.
diff --git a/clang/test/CodeGen/arm_neon_intrinsics.c b/clang/test/CodeGen/arm_neon_intrinsics.c
index d4bf8217d4eaf..b754cdcbce143 100644
--- a/clang/test/CodeGen/arm_neon_intrinsics.c
+++ b/clang/test/CodeGen/arm_neon_intrinsics.c
@@ -27142,164 +27142,164 @@ poly16x8x2_t test_vzipq_p16(poly16x8_t a, poly16x8_t b) {
//.
// CHECK: [[META2]] = !{[[META3:![0-9]+]]}
// CHECK: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]], !"vtrn_s8: %agg.result"}
-// CHECK: [[META4]] = distinct !{[[META4]], !"vtrn_s8"}
+// CHECK: [[META4]] = distinct !{[[META4]], i1 false, !"vtrn_s8"}
// CHECK: [[META5]] = !{[[META6:![0-9]+]]}
// CHECK: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]], !"vtrn_s16: %agg.result"}
-// CHECK: [[META7]] = distinct !{[[META7]], !"vtrn_s16"}
+// CHECK: [[META7]] = distinct !{[[META7]], i1 false, !"vtrn_s16"}
// CHECK: [[META8]] = !{[[META9:![0-9]+]]}
// CHECK: [[META9]] = distinct !{[[META9]], [[META10:![0-9]+]], !"vtrn_s32: %agg.result"}
-// CHECK: [[META10]] = distinct !{[[META10]], !"vtrn_s32"}
+// CHECK: [[META10]] = distinct !{[[META10]], i1 false, !"vtrn_s32"}
// CHECK: [[META11]] = !{[[META12:![0-9]+]]}
// CHECK: [[META12]] = distinct !{[[META12]], [[META13:![0-9]+]], !"vtrn_u8: %agg.result"}
-// CHECK: [[META13]] = distinct !{[[META13]], !"vtrn_u8"}
+// CHECK: [[META13]] = distinct !{[[META13]], i1 false, !"vtrn_u8"}
// CHECK: [[META14]] = !{[[META15:![0-9]+]]}
// CHECK: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]], !"vtrn_u16: %agg.result"}
-// CHECK: [[META16]] = distinct !{[[META16]], !"vtrn_u16"}
+// CHECK: [[META16]] = distinct !{[[META16]], i1 false, !"vtrn_u16"}
// CHECK: [[META17]] = !{[[META18:![0-9]+]]}
// CHECK: [[META18]] = distinct !{[[META18]], [[META19:![0-9]+]], !"vtrn_u32: %agg.result"}
-// CHECK: [[META19]] = distinct !{[[META19]], !"vtrn_u32"}
+// CHECK: [[META19]] = distinct !{[[META19]], i1 false, !"vtrn_u32"}
// CHECK: [[META20]] = !{[[META21:![0-9]+]]}
// CHECK: [[META21]] = distinct !{[[META21]], [[META22:![0-9]+]], !"vtrn_f32: %agg.result"}
-// CHECK: [[META22]] = distinct !{[[META22]], !"vtrn_f32"}
+// CHECK: [[META22]] = distinct !{[[META22]], i1 false, !"vtrn_f32"}
// CHECK: [[META23]] = !{[[META24:![0-9]+]]}
// CHECK: [[META24]] = distinct !{[[META24]], [[META25:![0-9]+]], !"vtrn_p8: %agg.result"}
-// CHECK: [[META25]] = distinct !{[[META25]], !"vtrn_p8"}
+// CHECK: [[META25]] = distinct !{[[META25]], i1 false, !"vtrn_p8"}
// CHECK: [[META26]] = !{[[META27:![0-9]+]]}
// CHECK: [[META27]] = distinct !{[[META27]], [[META28:![0-9]+]], !"vtrn_p16: %agg.result"}
-// CHECK: [[META28]] = distinct !{[[META28]], !"vtrn_p16"}
+// CHECK: [[META28]] = distinct !{[[META28]], i1 false, !"vtrn_p16"}
// CHECK: [[META29]] = !{[[META30:![0-9]+]]}
// CHECK: [[META30]] = distinct !{[[META30]], [[META31:![0-9]+]], !"vtrnq_s8: %agg.result"}
-// CHECK: [[META31]] = distinct !{[[META31]], !"vtrnq_s8"}
+// CHECK: [[META31]] = distinct !{[[META31]], i1 false, !"vtrnq_s8"}
// CHECK: [[META32]] = !{[[META33:![0-9]+]]}
// CHECK: [[META33]] = distinct !{[[META33]], [[META34:![0-9]+]], !"vtrnq_s16: %agg.result"}
-// CHECK: [[META34]] = distinct !{[[META34]], !"vtrnq_s16"}
+// CHECK: [[META34]] = distinct !{[[META34]], i1 false, !"vtrnq_s16"}
// CHECK: [[META35]] = !{[[META36:![0-9]+]]}
// CHECK: [[META36]] = distinct !{[[META36]], [[META37:![0-9]+]], !"vtrnq_s32: %agg.result"}
-// CHECK: [[META37]] = distinct !{[[META37]], !"vtrnq_s32"}
+// CHECK: [[META37]] = distinct !{[[META37]], i1 false, !"vtrnq_s32"}
// CHECK: [[META38]] = !{[[META39:![0-9]+]]}
// CHECK: [[META39]] = distinct !{[[META39]], [[META40:![0-9]+]], !"vtrnq_u8: %agg.result"}
-// CHECK: [[META40]] = distinct !{[[META40]], !"vtrnq_u8"}
+// CHECK: [[META40]] = distinct !{[[META40]], i1 false, !"vtrnq_u8"}
// CHECK: [[META41]] = !{[[META42:![0-9]+]]}
// CHECK: [[META42]] = distinct !{[[META42]], [[META43:![0-9]+]], !"vtrnq_u16: %agg.result"}
-// CHECK: [[META43]] = distinct !{[[META43]], !"vtrnq_u16"}
+// CHECK: [[META43]] = distinct !{[[META43]], i1 false, !"vtrnq_u16"}
// CHECK: [[META44]] = !{[[META45:![0-9]+]]}
// CHECK: [[META45]] = distinct !{[[META45]], [[META46:![0-9]+]], !"vtrnq_u32: %agg.result"}
-// CHECK: [[META46]] = distinct !{[[META46]], !"vtrnq_u32"}
+// CHECK: [[META46]] = distinct !{[[META46]], i1 false, !"vtrnq_u32"}
// CHECK: [[META47]] = !{[[META48:![0-9]+]]}
// CHECK: [[META48]] = distinct !{[[META48]], [[META49:![0-9]+]], !"vtrnq_f32: %agg.result"}
-// CHECK: [[META49]] = distinct !{[[META49]], !"vtrnq_f32"}
+// CHECK: [[META49]] = distinct !{[[META49]], i1 false, !"vtrnq_f32"}
// CHECK: [[META50]] = !{[[META51:![0-9]+]]}
// CHECK: [[META51]] = distinct !{[[META51]], [[META52:![0-9]+]], !"vtrnq_p8: %agg.result"}
-// CHECK: [[META52]] = distinct !{[[META52]], !"vtrnq_p8"}
+// CHECK: [[META52]] = distinct !{[[META52]], i1 false, !"vtrnq_p8"}
// CHECK: [[META53]] = !{[[META54:![0-9]+]]}
// CHECK: [[META54]] = distinct !{[[META54]], [[META55:![0-9]+]], !"vtrnq_p16: %agg.result"}
-// CHECK: [[META55]] = distinct !{[[META55]], !"vtrnq_p16"}
+// CHECK: [[META55]] = distinct !{[[META55]], i1 false, !"vtrnq_p16"}
// CHECK: [[META56]] = !{[[META57:![0-9]+]]}
// CHECK: [[META57]] = distinct !{[[META57]], [[META58:![0-9]+]], !"vuzp_s8: %agg.result"}
-// CHECK: [[META58]] = distinct !{[[META58]], !"vuzp_s8"}
+// CHECK: [[META58]] = distinct !{[[META58]], i1 false, !"vuzp_s8"}
// CHECK: [[META59]] = !{[[META60:![0-9]+]]}
// CHECK: [[META60]] = distinct !{[[META60]], [[META61:![0-9]+]], !"vuzp_s16: %agg.result"}
-// CHECK: [[META61]] = distinct !{[[META61]], !"vuzp_s16"}
+// CHECK: [[META61]] = distinct !{[[META61]], i1 false, !"vuzp_s16"}
// CHECK: [[META62]] = !{[[META63:![0-9]+]]}
// CHECK: [[META63]] = distinct !{[[META63]], [[META64:![0-9]+]], !"vuzp_s32: %agg.result"}
-// CHECK: [[META64]] = distinct !{[[META64]], !"vuzp_s32"}
+// CHECK: [[META64]] = distinct !{[[META64]], i1 false, !"vuzp_s32"}
// CHECK: [[META65]] = !{[[META66:![0-9]+]]}
// CHECK: [[META66]] = distinct !{[[META66]], [[META67:![0-9]+]], !"vuzp_u8: %agg.result"}
-// CHECK: [[META67]] = distinct !{[[META67]], !"vuzp_u8"}
+// CHECK: [[META67]] = distinct !{[[META67]], i1 false, !"vuzp_u8"}
// CHECK: [[META68]] = !{[[META69:![0-9]+]]}
// CHECK: [[META69]] = distinct !{[[META69]], [[META70:![0-9]+]], !"vuzp_u16: %agg.result"}
-// CHECK: [[META70]] = distinct !{[[META70]], !"vuzp_u16"}
+// CHECK: [[META70]] = distinct !{[[META70]], i1 false, !"vuzp_u16"}
// CHECK: [[META71]] = !{[[META72:![0-9]+]]}
// CHECK: [[META72]] = distinct !{[[META72]], [[META73:![0-9]+]], !"vuzp_u32: %agg.result"}
-// CHECK: [[META73]] = distinct !{[[META73]], !"vuzp_u32"}
+// CHECK: [[META73]] = distinct !{[[META73]], i1 false, !"vuzp_u32"}
// CHECK: [[META74]] = !{[[META75:![0-9]+]]}
// CHECK: [[META75]] = distinct !{[[META75]], [[META76:![0-9]+]], !"vuzp_f32: %agg.result"}
-// CHECK: [[META76]] = distinct !{[[META76]], !"vuzp_f32"}
+// CHECK: [[META76]] = distinct !{[[META76]], i1 false, !"vuzp_f32"}
// CHECK: [[META77]] = !{[[META78:![0-9]+]]}
// CHECK: [[META78]] = distinct !{[[META78]], [[META79:![0-9]+]], !"vuzp_p8: %agg.result"}
-// CHECK: [[META79]] = distinct !{[[META79]], !"vuzp_p8"}
+// CHECK: [[META79]] = distinct !{[[META79]], i1 false, !"vuzp_p8"}
// CHECK: [[META80]] = !{[[META81:![0-9]+]]}
// CHECK: [[META81]] = distinct !{[[META81]], [[META82:![0-9]+]], !"vuzp_p16: %agg.result"}
-// CHECK: [[META82]] = distinct !{[[META82]], !"vuzp_p16"}
+// CHECK: [[META82]] = distinct !{[[META82]], i1 false, !"vuzp_p16"}
// CHECK: [[META83]] = !{[[META84:![0-9]+]]}
// CHECK: [[META84]] = distinct !{[[META84]], [[META85:![0-9]+]], !"vuzpq_s8: %agg.result"}
-// CHECK: [[META85]] = distinct !{[[META85]], !"vuzpq_s8"}
+// CHECK: [[META85]] = distinct !{[[META85]], i1 false, !"vuzpq_s8"}
// CHECK: [[META86]] = !{[[META87:![0-9]+]]}
// CHECK: [[META87]] = distinct !{[[META87]], [[META88:![0-9]+]], !"vuzpq_s16: %agg.result"}
-// CHECK: [[META88]] = distinct !{[[META88]], !"vuzpq_s16"}
+// CHECK: [[META88]] = distinct !{[[META88]], i1 false, !"vuzpq_s16"}
// CHECK: [[META89]] = !{[[META90:![0-9]+]]}
// CHECK: [[META90]] = distinct !{[[META90]], [[META91:![0-9]+]], !"vuzpq_s32: %agg.result"}
-// CHECK: [[META91]] = distinct !{[[META91]], !"vuzpq_s32"}
+// CHECK: [[META91]] = distinct !{[[META91]], i1 false, !"vuzpq_s32"}
// CHECK: [[META92]] = !{[[META93:![0-9]+]]}
// CHECK: [[META93]] = distinct !{[[META93]], [[META94:![0-9]+]], !"vuzpq_u8: %agg.result"}
-// CHECK: [[META94]] = distinct !{[[META94]], !"vuzpq_u8"}
+// CHECK: [[META94]] = distinct !{[[META94]], i1 false, !"vuzpq_u8"}
// CHECK: [[META95]] = !{[[META96:![0-9]+]]}
// CHECK: [[META96]] = distinct !{[[META96]], [[META97:![0-9]+]], !"vuzpq_u16: %agg.result"}
-// CHECK: [[META97]] = distinct !{[[META97]], !"vuzpq_u16"}
+// CHECK: [[META97]] = distinct !{[[META97]], i1 false, !"vuzpq_u16"}
// CHECK: [[META98]] = !{[[META99:![0-9]+]]}
// CHECK: [[META99]] = distinct !{[[META99]], [[META100:![0-9]+]], !"vuzpq_u32: %agg.result"}
-// CHECK: [[META100]] = distinct !{[[META100]], !"vuzpq_u32"}
+// CHECK: [[META100]] = distinct !{[[META100]], i1 false, !"vuzpq_u32"}
// CHECK: [[META101]] = !{[[META102:![0-9]+]]}
// CHECK: [[META102]] = distinct !{[[META102]], [[META103:![0-9]+]], !"vuzpq_f32: %agg.result"}
-// CHECK: [[META103]] = distinct !{[[META103]], !"vuzpq_f32"}
+// CHECK: [[META103]] = distinct !{[[META103]], i1 false, !"vuzpq_f32"}
// CHECK: [[META104]] = !{[[META105:![0-9]+]]}
// CHECK: [[META105]] = distinct !{[[META105]], [[META106:![0-9]+]], !"vuzpq_p8: %agg.result"}
-// CHECK: [[META106]] = distinct !{[[META106]], !"vuzpq_p8"}
+// CHECK: [[META106]] = distinct !{[[META106]], i1 false, !"vuzpq_p8"}
// CHECK: [[META107]] = !{[[META108:![0-9]+]]}
// CHECK: [[META108]] = distinct !{[[META108]], [[META109:![0-9]+]], !"vuzpq_p16: %agg.result"}
-// CHECK: [[META109]] = distinct !{[[META109]], !"vuzpq_p16"}
+// CHECK: [[META109]] = distinct !{[[META109]], i1 false, !"vuzpq_p16"}
// CHECK: [[META110]] = !{[[META111:![0-9]+]]}
// CHECK: [[META111]] = distinct !{[[META111]], [[META112:![0-9]+]], !"vzip_s8: %agg.result"}
-// CHECK: [[META112]] = distinct !{[[META112]], !"vzip_s8"}
+// CHECK: [[META112]] = distinct !{[[META112]], i1 false, !"vzip_s8"}
// CHECK: [[META113]] = !{[[META114:![0-9]+]]}
// CHECK: [[META114]] = distinct !{[[META114]], [[META115:![0-9]+]], !"vzip_s16: %agg.result"}
-// CHECK: [[META115]] = distinct !{[[META115]], !"vzip_s16"}
+// CHECK: [[META115]] = distinct !{[[META115]], i1 false, !"vzip_s16"}
// CHECK: [[META116]] = !{[[META117:![0-9]+]]}
// CHECK: [[META117]] = distinct !{[[META117]], [[META118:![0-9]+]], !"vzip_s32: %agg.result"}
-// CHECK: [[META118]] = distinct !{[[META118]], !"vzip_s32"}
+// CHECK: [[META118]] = distinct !{[[META118]], i1 false, !"vzip_s32"}
// CHECK: [[META119]] = !{[[META120:![0-9]+]]}
// CHECK: [[META120]] = distinct !{[[META120]], [[META121:![0-9]+]], !"vzip_u8: %agg.result"}
-// CHECK: [[META121]] = distinct !{[[META121]], !"vzip_u8"}
+// CHECK: [[META121]] = distinct !{[[META121]], i1 false, !"vzip_u8"}
// CHECK: [[META122]] = !{[[META123:![0-9]+]]}
// CHECK: [[META123]] = distinct !{[[META123]], [[META124:![0-9]+]], !"vzip_u16: %agg.result"}
-// CHECK: [[META124]] = distinct !{[[META124]], !"vzip_u16"}
+// CHECK: [[META124]] = distinct !{[[META124]], i1 false, !"vzip_u16"}
// CHECK: [[META125]] = !{[[META126:![0-9]+]]}
// CHECK: [[META126]] = distinct !{[[META126]], [[META127:![0-9]+]], !"vzip_u32: %agg.result"}
-// CHECK: [[META127]] = distinct !{[[META127]], !"vzip_u32"}
+// CHECK: [[META127]] = distinct !{[[META127]], i1 false, !"vzip_u32"}
// CHECK: [[META128]] = !{[[META129:![0-9]+]]}
// CHECK: [[META129]] = distinct !{[[META129]], [[META130:![0-9]+]], !"vzip_f32: %agg.result"}
-// CHECK: [[META130]] = distinct !{[[META130]], !"vzip_f32"}
+// CHECK: [[META130]] = distinct !{[[META130]], i1 false, !"vzip_f32"}
// CHECK: [[META131]] = !{[[META132:![0-9]+]]}
// CHECK: [[META132]] = distinct !{[[META132]], [[META133:![0-9]+]], !"vzip_p8: %agg.result"}
-// CHECK: [[META133]] = distinct !{[[META133]], !"vzip_p8"}
+// CHECK: [[META133]] = distinct !{[[META133]], i1 false, !"vzip_p8"}
// CHECK: [[META134]] = !{[[META135:![0-9]+]]}
// CHECK: [[META135]] = distinct !{[[META135]], [[META136:![0-9]+]], !"vzip_p16: %agg.result"}
-// CHECK: [[META136]] = distinct !{[[META136]], !"vzip_p16"}
+// CHECK: [[META136]] = distinct !{[[META136]], i1 false, !"vzip_p16"}
// CHECK: [[META137]] = !{[[META138:![0-9]+]]}
// CHECK: [[META138]] = distinct !{[[META138]], [[META139:![0-9]+]], !"vzipq_s8: %agg.result"}
-// CHECK: [[META139]] = distinct !{[[META139]], !"vzipq_s8"}
+// CHECK: [[META139]] = distinct !{[[META139]], i1 false, !"vzipq_s8"}
// CHECK: [[META140]] = !{[[META141:![0-9]+]]}
// CHECK: [[META141]] = distinct !{[[META141]], [[META142:![0-9]+]], !"vzipq_s16: %agg.result"}
-// CHECK: [[META142]] = distinct !{[[META142]], !"vzipq_s16"}
+// CHECK: [[META142]] = distinct !{[[META142]], i1 false, !"vzipq_s16"}
// CHECK: [[META143]] = !{[[META144:![0-9]+]]}
// CHECK: [[META144]] = distinct !{[[META144]], [[META145:![0-9]+]], !"vzipq_s32: %agg.result"}
-// CHECK: [[META145]] = distinct !{[[META145]], !"vzipq_s32"}
+// CHECK: [[META145]] = distinct !{[[META145]], i1 false, !"vzipq_s32"}
// CHECK: [[META146]] = !{[[META147:![0-9]+]]}
// CHECK: [[META147]] = distinct !{[[META147]], [[META148:![0-9]+]], !"vzipq_u8: %agg.result"}
-// CHECK: [[META148]] = distinct !{[[META148]], !"vzipq_u8"}
+// CHECK: [[META148]] = distinct !{[[META148]], i1 false, !"vzipq_u8"}
// CHECK: [[META149]] = !{[[META150:![0-9]+]]}
// CHECK: [[META150]] = distinct !{[[META150]], [[META151:![0-9]+]], !"vzipq_u16: %agg.result"}
-// CHECK: [[META151]] = distinct !{[[META151]], !"vzipq_u16"}
+// CHECK: [[META151]] = distinct !{[[META151]], i1 false, !"vzipq_u16"}
// CHECK: [[META152]] = !{[[META153:![0-9]+]]}
// CHECK: [[META153]] = distinct !{[[META153]], [[META154:![0-9]+]], !"vzipq_u32: %agg.result"}
-// CHECK: [[META154]] = distinct !{[[META154]], !"vzipq_u32"}
+// CHECK: [[META154]] = distinct !{[[META154]], i1 false, !"vzipq_u32"}
// CHECK: [[META155]] = !{[[META156:![0-9]+]]}
// CHECK: [[META156]] = distinct !{[[META156]], [[META157:![0-9]+]], !"vzipq_f32: %agg.result"}
-// CHECK: [[META157]] = distinct !{[[META157]], !"vzipq_f32"}
+// CHECK: [[META157]] = distinct !{[[META157]], i1 false, !"vzipq_f32"}
// CHECK: [[META158]] = !{[[META159:![0-9]+]]}
// CHECK: [[META159]] = distinct !{[[META159]], [[META160:![0-9]+]], !"vzipq_p8: %agg.result"}
-// CHECK: [[META160]] = distinct !{[[META160]], !"vzipq_p8"}
+// CHECK: [[META160]] = distinct !{[[META160]], i1 false, !"vzipq_p8"}
// CHECK: [[META161]] = !{[[META162:![0-9]+]]}
// CHECK: [[META162]] = distinct !{[[META162]], [[META163:![0-9]+]], !"vzipq_p16: %agg.result"}
-// CHECK: [[META163]] = distinct !{[[META163]], !"vzipq_p16"}
+// CHECK: [[META163]] = distinct !{[[META163]], i1 false, !"vzipq_p16"}
//.
diff --git a/clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp b/clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp
index 76dcad0b19a42..e4f98484a28fc 100644
--- a/clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp
+++ b/clang/test/OpenMP/taskloop_strictmodifier_codegen.cpp
@@ -355,7 +355,7 @@ struct S {
// CHECK: [[LONG_TBAA30]] = !{[[META22]], [[META17]], i64 48}
// CHECK: [[META31]] = !{[[META32:![0-9]+]]}
// CHECK: [[META32]] = distinct !{[[META32]], [[META33:![0-9]+]], !".omp_outlined..5: %__context"}
-// CHECK: [[META33]] = distinct !{[[META33]], !".omp_outlined..5"}
+// CHECK: [[META33]] = distinct !{[[META33]], i1 false, !".omp_outlined..5"}
// CHECK: [[INTPTR_TBAA34]] = !{[[META35:![0-9]+]], [[META25]], i64 0}
// CHECK: [[META35]] = !{!"_ZTSZ4mainE3$_3", [[META25]], i64 0, [[META27]], i64 8}
// CHECK: [[META36]] = !{}
@@ -368,7 +368,7 @@ struct S {
// CHECK: [[META43]] = !{!"p1 _ZTS1S", [[META11]], i64 0}
// CHECK: [[META44]] = !{[[META45:![0-9]+]]}
// CHECK: [[META45]] = distinct !{[[META45]], [[META46:![0-9]+]], !".omp_outlined..9: %__context"}
-// CHECK: [[META46]] = distinct !{[[META46]], !".omp_outlined..9"}
+// CHECK: [[META46]] = distinct !{[[META46]], i1 false, !".omp_outlined..9"}
// CHECK: [[INTPTR_TBAA47]] = !{[[META48:![0-9]+]], [[META25]], i64 8}
// CHECK: [[META48]] = !{!"_ZTSZN1SC1EiEUt_", [[META43]], i64 0, [[META25]], i64 8}
//.
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index ee7068b2125cc..11037c482daf5 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7624,11 +7624,20 @@ used for example during inlining. As the noalias function parameters are
turned into noalias scope metadata, a new domain is used every time the
function is inlined.
-The metadata identifying each domain is itself a list containing one or two
+The metadata identifying each domain is itself a list containing two or three
entries. The first entry is the name of the domain. Note that if the name is a
string then it can be combined across functions and translation units. A
-self-reference can be used to create globally unique domain names. A
-descriptive string may optionally be provided as a second list entry.
+self-reference can be used to create globally unique domain names. The second
+entry is an `i1` constant that marks the domain as having disjoint scopes when
+it is `true`. A descriptive string may optionally be provided as a third list
+entry.
+
+If an alias scope domain has disjoint scopes, tagging an instruction with an
+`alias.scope` within that domain implicitly tags that instruction with a
+`noalias` set containing all scopes in that domain not present in the
+instruction's `!alias.scope` list. This makes it unnecessary to spell out the
+complement of each scope when a group of N pointers is known to be mutually
+non-aliasing.
The metadata identifying each scope is also itself a list containing two or
three entries. The first entry is the name of the scope. Note that if the name
@@ -7641,8 +7650,8 @@ For example,
```llvm
; Two scope domains:
-!0 = !{!0}
-!1 = !{!1}
+!0 = !{!0, i1 false}
+!1 = !{!1, i1 false}
; Some scopes in these domains:
!2 = !{!2, !0}
@@ -7670,6 +7679,30 @@ store float %2, ptr %arrayidx.i2, align 4, !noalias !6
store float %0, ptr %arrayidx.i, align 4, !noalias !7
```
+And, with a domain whose scopes are disjoint,
+
+```llvm
+; A domain with disjoint scopes and three scopes within it:
+!0 = !{!0, i1 true, !"disjoint domain"}
+!1 = !{!1, !0}
+!2 = !{!2, !0}
+!3 = !{!3, !0}
+
+; Some scope lists:
+!4 = !{!1}
+!5 = !{!2}
+!6 = !{!2, !3}
+!7 = !{!1, !3}
+
+; These two instructions don't alias, because tagging them with !1 and !2
+; implicitly tags them with !noalias !6 and !noalias !7, respectively:
+%0 = load float, ptr %a, align 4, !alias.scope !4
+store float %0, ptr %b, align 4, !alias.scope !5
+
+; This instruction could be either in scope !1 or !3, so is implicitly !noalias !5.
+%1 = load float, ptr %ac, align 4, !alias.scope !7
+```
+
(fpmath-metadata)=
#### '`fpmath`' Metadata
@@ -26257,7 +26290,7 @@ exit:
ret void
}
-!0 = !{!0} ; domain
+!0 = !{!0, i1 false} ; domain
!1 = !{!1, !0} ; scope
!2 = !{!1} ; scope list
```
diff --git a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
index 76536ea1ab573..98cc3161f7f53 100644
--- a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
+++ b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
@@ -58,6 +58,12 @@ class ScopedNoAliasAAResult : public AAResultBase {
LLVM_ABI static bool mayAliasInScopes(const MDNode *Scopes,
const MDNode *NoAlias);
+
+ /// Return false if two accesses in the scope lists \p Scopes1 and \p Scopes2
+ /// are kept apart by the implicit noalias sets of a domain with disjoint
+ /// scopes.
+ LLVM_ABI static bool mayAliasInDisjointDomains(const MDNode *Scopes1,
+ const MDNode *Scopes2);
};
/// Analysis pass providing a never-invalidated alias analysis result.
diff --git a/llvm/include/llvm/IR/MDBuilder.h b/llvm/include/llvm/IR/MDBuilder.h
index e88de73567c35..1b60fd7cb7306 100644
--- a/llvm/include/llvm/IR/MDBuilder.h
+++ b/llvm/include/llvm/IR/MDBuilder.h
@@ -182,12 +182,12 @@ class MDBuilder {
return createAnonymousAARoot();
}
- /// Return metadata appropriate for an alias scope domain node.
+ /// Return metadata appropriate for an alias scope domain node, whose scopes
+ /// are disjoint if \p DisjointScopes is set.
/// Each returned node is distinct from all other metadata and will never
/// be identified (uniqued) with anything else.
- MDNode *createAnonymousAliasScopeDomain(StringRef Name = StringRef()) {
- return createAnonymousAARoot(Name);
- }
+ LLVM_ABI MDNode *createAnonymousAliasScopeDomain(StringRef Name = StringRef(),
+ bool DisjointScopes = false);
/// Return metadata appropriate for an alias scope root node.
/// Each returned node is distinct from all other metadata and will never
@@ -203,9 +203,10 @@ class MDBuilder {
LLVM_ABI MDNode *createTBAARoot(StringRef Name);
/// Return metadata appropriate for an alias scope domain node with
- /// the given name. This may be identified (uniqued) with other roots with
- /// the same name.
- LLVM_ABI MDNode *createAliasScopeDomain(StringRef Name);
+ /// the given name, whose scopes are disjoint if \p DisjointScopes is set.
+ /// This may be identified (uniqued) with other roots with the same name.
+ LLVM_ABI MDNode *createAliasScopeDomain(StringRef Name,
+ bool DisjointScopes = false);
/// Return metadata appropriate for an alias scope node with
/// the given name. This may be identified (uniqued) with other scopes with
diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h
index 9347a3dd93e13..0687ba4901242 100644
--- a/llvm/include/llvm/IR/Metadata.h
+++ b/llvm/include/llvm/IR/Metadata.h
@@ -1597,6 +1597,34 @@ void TempMDNodeDeleter::operator()(MDNode *Node) const {
MDNode::deleteTemporary(Node);
}
+/// Wrapper around alias scope domain metedata to allow accessing their fields,
+/// including surfacing the optional `i1 disjoint` parameter, hiding the details
+/// of the metadata encoding.
+class AliasScopeDomainNode {
+ const MDNode *Node = nullptr;
+
+public:
+ AliasScopeDomainNode() = default;
+ explicit AliasScopeDomainNode(const MDNode *N) : Node(N) {}
+
+ /// Get the MDNode for this AliasScopeDomainNode.
+ const MDNode *getNode() const { return Node; }
+
+ StringRef getName() const {
+ if (Node->getNumOperands() > 2)
+ if (MDString *N = dyn_cast_or_null<MDString>(Node->getOperand(2)))
+ return N->getString();
+ return StringRef();
+ }
+
+ /// Return true if this domain has disjoint scopes.
+ bool hasDisjointScopes() const {
+ const Constant *Disjoint =
+ mdconst::dyn_extract_or_null<Constant>(Node->getOperand(1));
+ return Disjoint && Disjoint->isOneValue();
+ }
+};
+
/// This is a simple wrapper around an MDNode which provides a higher-level
/// interface by hiding the details of how alias analysis information is encoded
/// in its operands.
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
index 4a0f8b6d1605d..f005f6ac927f3 100644
--- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp
+++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
@@ -12,9 +12,10 @@
// Alias-analysis scopes are defined by an id (which can be a string or some
// other metadata node), a domain node, and an optional descriptive string.
// A domain is defined by an id (which can be a string or some other metadata
-// node), and an optional descriptive string.
+// node), a flag saying whether its scopes are disjoint, and an optional
+// descriptive string.
//
-// !dom0 = metadata !{ metadata !"domain of foo()" }
+// !dom0 = metadata !{ metadata !"domain of foo()", i1 false }
// !scope1 = metadata !{ metadata !scope1, metadata !dom0, metadata !"scope 1" }
// !scope2 = metadata !{ metadata !scope2, metadata !dom0, metadata !"scope 2" }
//
@@ -29,6 +30,17 @@
// scopes in that domain of some other instruction, then the two memory
// accesses are assumed not to alias.
//
+// A domain can also declare its scopes to be disjoint, in which case tagging
+// an instruction with an alias scope from that domain implicitly tags it with
+// a noalias set containing every other scope in that domain:
+//
+// !dom1 = metadata !{ metadata !dom1, i1 true, metadata !"disjoint domain" }
+// !scope3 = metadata !{ metadata !scope3, metadata !dom1 }
+// !scope4 = metadata !{ metadata !scope4, metadata !dom1 }
+//
+// ... = load %ptr3, !alias.scope !{ !scope3 } ; doesn't alias the load below
+// ... = load %ptr4, !alias.scope !{ !scope4 }
+//
//===----------------------------------------------------------------------===//
#include "llvm/Analysis/ScopedNoAliasAA.h"
@@ -68,6 +80,9 @@ AliasResult ScopedNoAliasAAResult::alias(const MemoryLocation &LocA,
if (!mayAliasInScopes(BScopes, ANoAlias))
return AliasResult::NoAlias;
+ if (!mayAliasInDisjointDomains(AScopes, BScopes))
+ return AliasResult::NoAlias;
+
return AliasResult::MayAlias;
}
@@ -91,6 +106,10 @@ ModRefInfo ScopedNoAliasAAResult::getModRefInfo(const CallBase *Call,
Loc.AATags.NoAlias))
return ModRefInfo::NoModRef;
+ if (!mayAliasInDisjointDomains(
+ Loc.AATags.Scope, Call->getMetadata(LLVMContext::MD_alias_scope)))
+ return ModRefInfo::NoModRef;
+
return ModRefInfo::ModRef;
}
@@ -108,6 +127,10 @@ ModRefInfo ScopedNoAliasAAResult::getModRefInfo(const FenceInst *F,
Loc.AATags.NoAlias))
return ModRefInfo::NoModRef;
+ if (!mayAliasInDisjointDomains(Loc.AATags.Scope,
+ F->getMetadata(LLVMContext::MD_alias_scope)))
+ return ModRefInfo::NoModRef;
+
return ModRefInfo::ModRef;
}
@@ -125,6 +148,11 @@ ModRefInfo ScopedNoAliasAAResult::getModRefInfo(const CallBase *Call1,
Call1->getMetadata(LLVMContext::MD_noalias)))
return ModRefInfo::NoModRef;
+ if (!mayAliasInDisjointDomains(
+ Call1->getMetadata(LLVMContext::MD_alias_scope),
+ Call2->getMetadata(LLVMContext::MD_alias_scope)))
+ return ModRefInfo::NoModRef;
+
return ModRefInfo::ModRef;
}
@@ -176,6 +204,37 @@ bool ScopedNoAliasAAResult::mayAliasInScopes(const MDNode *Scopes,
return true;
}
+bool ScopedNoAliasAAResult::mayAliasInDisjointDomains(const MDNode *Scopes1,
+ const MDNode *Scopes2) {
+ if (!Scopes1 || !Scopes2)
+ return true;
+
+ // Collect the domains with disjoint scopes that the first access is in.
+ SmallPtrSet<const MDNode *, 16> Domains;
+ for (const MDOperand &MDOp : Scopes1->operands())
+ if (const MDNode *MD = dyn_cast<MDNode>(MDOp))
+ if (const MDNode *Domain = AliasScopeNode(MD).getDomain())
+ if (AliasScopeDomainNode(Domain).hasDisjointScopes())
+ Domains.insert(Domain);
+
+ // Each access is implicitly noalias with every scope of such a domain it is
+ // not itself in, so the accesses don't alias if, for some domain, they have
+ // no scope in common.
+ for (const MDNode *Domain : Domains) {
+ SmallPtrSet<const MDNode *, 16> Nodes2;
+ collectMDInDomain(Scopes2, Domain, Nodes2);
+ if (Nodes2.empty())
+ continue;
+
+ SmallPtrSet<const MDNode *, 16> Nodes1;
+ collectMDInDomain(Scopes1, Domain, Nodes1);
+ if (!llvm::set_intersects(Nodes1, Nodes2))
+ return false;
+ }
+
+ return true;
+}
+
AnalysisKey ScopedNoAliasAA::Key;
ScopedNoAliasAAResult ScopedNoAliasAA::run(Function &F,
diff --git a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
index 4b338ae6237ec..9aed4eff5e1b3 100644
--- a/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
+++ b/llvm/lib/Bitcode/Reader/BitcodeReader.cpp
@@ -7037,6 +7037,15 @@ Error BitcodeReader::parseFunctionBody(Function *F) {
cast<CallInst>(I)->setAttributes(PAL);
if (isa<DbgInfoIntrinsic>(I))
SeenDebugIntrinsic = true;
+ if (auto *Decl = dyn_cast<NoAliasScopeDeclInst>(I)) {
+ unsigned ArgNo = Intrinsic::NoAliasScopeDeclScopeArg;
+ if (auto *ListAsValue =
+ dyn_cast<MetadataAsValue>(Decl->getOperand(ArgNo)))
+ if (auto *List = dyn_cast<MDNode>(ListAsValue->getMetadata()))
+ Decl->setOperand(
+ ArgNo, MetadataAsValue::get(
+ Context, MDLoader->upgradeAliasScopeList(List)));
+ }
if (Error Err = propagateAttributeTypes(cast<CallBase>(I), ArgTyIDs)) {
I->deleteValue();
return Err;
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 80e44634d6f95..2aacd64d94da4 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -335,6 +335,67 @@ Metadata *BitcodeReaderMetadataList::resolveTypeArray(Metadata *MaybeTuple) {
return MDTuple::get(Context, Ops);
}
+/// Rebuild \p Old with \p Ops, keeping its identity: a self reference has to
+/// point at the replacement, and a distinct node must not be uniqued.
+static MDNode *rebuildAliasScopeNode(MDNode *Old,
+ SmallVectorImpl<Metadata *> &Ops) {
+ LLVMContext &Context = Old->getContext();
+ if (Ops[0] != Old)
+ return Old->isDistinct() ? MDNode::getDistinct(Context, Ops)
+ : MDNode::get(Context, Ops);
+
+ Ops[0] = nullptr;
+ MDNode *New = MDNode::getDistinct(Context, Ops);
+ New->replaceOperandWith(0, New);
+ return New;
+}
+
+static MDNode *upgradeAliasScopeDomain(MDNode *Domain,
+ DenseMap<MDNode *, MDNode *> &Upgraded) {
+ unsigned NumOperands = Domain->getNumOperands();
+ bool HadDescription = NumOperands == 2;
+ // Already upgraded, or invalid and left to the verifier.
+ if (NumOperands == 0 || NumOperands > 2 ||
+ (HadDescription && mdconst::hasa<ConstantInt>(Domain->getOperand(1))))
+ return Domain;
+
+ if (MDNode *Upgrade = Upgraded.lookup(Domain))
+ return Upgrade;
+
+ LLVMContext &Context = Domain->getContext();
+ SmallVector<Metadata *, 3> Ops = {
+ Domain->getOperand(0),
+ ConstantAsMetadata::get(ConstantInt::getFalse(Context))};
+ if (HadDescription)
+ Ops.push_back(Domain->getOperand(1));
+
+ MDNode *Upgrade = rebuildAliasScopeNode(Domain, Ops);
+ Upgraded[Domain] = Upgrade;
+ return Upgrade;
+}
+
+static MDNode *upgradeAliasScope(MDNode *Scope,
+ DenseMap<MDNode *, MDNode *> &Upgraded) {
+ if (MDNode *Upgrade = Upgraded.lookup(Scope))
+ return Upgrade;
+
+ auto *Domain = Scope->getNumOperands() >= 2
+ ? dyn_cast_or_null<MDNode>(Scope->getOperand(1))
+ : nullptr;
+ if (!Domain)
+ return Scope;
+
+ MDNode *UpgradedDomain = upgradeAliasScopeDomain(Domain, Upgraded);
+ if (UpgradedDomain == Domain)
+ return Scope;
+
+ SmallVector<Metadata *, 3> Ops(Scope->op_begin(), Scope->op_end());
+ Ops[1] = UpgradedDomain;
+ MDNode *Upgrade = rebuildAliasScopeNode(Scope, Ops);
+ Upgraded[Scope] = Upgrade;
+ return Upgrade;
+}
+
namespace {
class PlaceholderQueue {
@@ -460,6 +521,10 @@ class MetadataLoader::MetadataLoaderImpl {
bool StripTBAA = false;
bool HasSeenOldLoopTags = false;
+
+ /// Rebuilt alias scopes and domains, so that upgraded domains get reused
+ /// correctly and to memoize.
+ DenseMap<MDNode *, MDNode *> UpgradedAliasScopes;
bool NeedUpgradeToDIGlobalVariableExpression = false;
bool NeedDeclareExpressionUpgrade = false;
@@ -798,6 +863,29 @@ class MetadataLoader::MetadataLoaderImpl {
bool hasSeenOldLoopTags() const { return HasSeenOldLoopTags; }
+ /// Mark any domains in \p ScopeList that don't have a disjointness
+ /// flag as non-disjoint. Returns the original list if there are no changes.
+ MDNode *upgradeAliasScopeList(MDNode *ScopeList) {
+ if (MDNode *Upgrade = UpgradedAliasScopes.lookup(ScopeList))
+ return Upgrade;
+
+ SmallVector<Metadata *, 4> Ops;
+ bool Changed = false;
+ for (const MDOperand &Op : ScopeList->operands()) {
+ Metadata *Scope = Op;
+ if (auto *ScopeNode = dyn_cast<MDNode>(Op))
+ Scope = upgradeAliasScope(ScopeNode, UpgradedAliasScopes);
+ Changed |= Scope != Op.get();
+ Ops.push_back(Scope);
+ }
+ if (!Changed)
+ return ScopeList;
+
+ MDNode *Upgrade = MDNode::get(ScopeList->getContext(), Ops);
+ UpgradedAliasScopes[ScopeList] = Upgrade;
+ return Upgrade;
+ }
+
Error parseMetadataAttachment(Function &F,
ArrayRef<Instruction *> InstructionList);
@@ -2651,6 +2739,11 @@ Error MetadataLoader::MetadataLoaderImpl::parseMetadataAttachment(
assert(!MD->isTemporary() && "should load MDs before attachments");
MD = UpgradeTBAAStructNode(*MD);
}
+
+ if (I->second == LLVMContext::MD_alias_scope ||
+ I->second == LLVMContext::MD_noalias)
+ MD = upgradeAliasScopeList(MD);
+
Inst->setMetadata(I->second, MD);
}
break;
@@ -2768,3 +2861,7 @@ void MetadataLoader::shrinkTo(unsigned N) { return Pimpl->shrinkTo(N); }
void MetadataLoader::upgradeDebugIntrinsics(Function &F) {
return Pimpl->upgradeDebugIntrinsics(F);
}
+
+MDNode *MetadataLoader::upgradeAliasScopeList(MDNode *ScopeList) {
+ return Pimpl->upgradeAliasScopeList(ScopeList);
+}
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.h b/llvm/lib/Bitcode/Reader/MetadataLoader.h
index bab855ca63591..04efa4836dea5 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.h
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.h
@@ -25,6 +25,7 @@ class BitstreamCursor;
class DISubprogram;
class Function;
class Instruction;
+class MDNode;
class Metadata;
class Module;
class Type;
@@ -92,6 +93,10 @@ class MetadataLoader {
/// Perform bitcode upgrades on llvm.dbg.* calls.
void upgradeDebugIntrinsics(Function &F);
+
+ /// Mark any domains in \p ScopeList that don't have a disjointness
+ /// flag as non-disjoint. Returns the original list if there are no changes.
+ MDNode *upgradeAliasScopeList(MDNode *ScopeList);
};
}
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index c4e4df7ace8b1..b943680dade25 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -28,6 +28,7 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/InstIterator.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
diff --git a/llvm/lib/IR/MDBuilder.cpp b/llvm/lib/IR/MDBuilder.cpp
index 9a8e417b43ba7..93314a2bdc0bb 100644
--- a/llvm/lib/IR/MDBuilder.cpp
+++ b/llvm/lib/IR/MDBuilder.cpp
@@ -210,6 +210,20 @@ MDNode *MDBuilder::createAnonymousAARoot(StringRef Name, MDNode *Extra) {
return Root;
}
+MDNode *MDBuilder::createAnonymousAliasScopeDomain(StringRef Name,
+ bool DisjointScopes) {
+ SmallVector<Metadata *, 3> Args = {
+ nullptr, createConstant(ConstantInt::getBool(Context, DisjointScopes))};
+ if (!Name.empty())
+ Args.push_back(createString(Name));
+ MDNode *Domain = MDNode::getDistinct(Context, Args);
+
+ // Replace the reserved operand with the domain node itself, as is done for
+ // any other self-referential root.
+ Domain->replaceOperandWith(0, Domain);
+ return Domain;
+}
+
MDNode *MDBuilder::createTBAARoot(StringRef Name) {
return MDNode::get(Context, createString(Name));
}
@@ -226,8 +240,10 @@ MDNode *MDBuilder::createTBAANode(StringRef Name, MDNode *Parent,
return MDNode::get(Context, {createString(Name), Parent});
}
-MDNode *MDBuilder::createAliasScopeDomain(StringRef Name) {
- return MDNode::get(Context, createString(Name));
+MDNode *MDBuilder::createAliasScopeDomain(StringRef Name, bool DisjointScopes) {
+ return MDNode::get(
+ Context, {createString(Name),
+ createConstant(ConstantInt::getBool(Context, DisjointScopes))});
}
MDNode *MDBuilder::createAliasScope(StringRef Name, MDNode *Domain) {
diff --git a/llvm/lib/IR/Verifier.cpp b/llvm/lib/IR/Verifier.cpp
index 2502d574dd992..1d218ad198ca2 100644
--- a/llvm/lib/IR/Verifier.cpp
+++ b/llvm/lib/IR/Verifier.cpp
@@ -5739,14 +5739,18 @@ void Verifier::visitAliasScopeMetadata(const MDNode *MD) {
Check(Domain != nullptr, "second scope operand must be MDNode", MD);
unsigned NumDomainOps = Domain->getNumOperands();
- Check(NumDomainOps >= 1 && NumDomainOps <= 2,
- "domain must have one or two operands", Domain);
+ Check(NumDomainOps >= 2 && NumDomainOps <= 3,
+ "domain must have two or three operands", Domain);
Check(Domain->getOperand(0).get() == Domain ||
isa<MDString>(Domain->getOperand(0)),
"first domain operand must be self-referential or string", Domain);
- if (NumDomainOps == 2)
- Check(isa<MDString>(Domain->getOperand(1)),
- "second domain operand must be string (if used)", Domain);
+ const auto *Disjoint =
+ mdconst::dyn_extract_or_null<ConstantInt>(Domain->getOperand(1));
+ Check(Disjoint && Disjoint->getBitWidth() == 1,
+ "second domain operand must be an i1 constant", Domain);
+ if (NumDomainOps == 3)
+ Check(isa<MDString>(Domain->getOperand(2)),
+ "third domain operand must be string (if used)", Domain);
}
void Verifier::visitAliasScopeListMetadata(const MDNode *MD) {
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 3ca4974a2d661..54d3edab56e09 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -5980,6 +5980,10 @@ bool InstCombinerImpl::run() {
class AliasScopeTracker {
SmallPtrSet<const MDNode *, 8> UsedAliasScopesAndLists;
SmallPtrSet<const MDNode *, 8> UsedNoAliasScopesAndLists;
+ // The domains with disjoint scopes of which more than one scope is used by
+ // !alias.scope, along with the first such scope seen for each domain.
+ SmallDenseMap<const MDNode *, const MDNode *, 4> FirstScopeInDisjointDomain;
+ SmallPtrSet<const MDNode *, 4> UsedDisjointDomains;
public:
void analyse(Instruction *I) {
@@ -5987,17 +5991,29 @@ class AliasScopeTracker {
if (!I->hasMetadataOtherThanDebugLoc())
return;
- auto Track = [](Metadata *ScopeList, auto &Container) {
+ auto Track = [](Metadata *ScopeList, auto &Container, auto OnScope) {
const auto *MDScopeList = dyn_cast_or_null<MDNode>(ScopeList);
if (!MDScopeList || !Container.insert(MDScopeList).second)
return;
for (const auto &MDOperand : MDScopeList->operands())
- if (auto *MDScope = dyn_cast<MDNode>(MDOperand))
+ if (auto *MDScope = dyn_cast<MDNode>(MDOperand)) {
Container.insert(MDScope);
+ OnScope(MDScope);
+ }
};
- Track(I->getMetadata(LLVMContext::MD_alias_scope), UsedAliasScopesAndLists);
- Track(I->getMetadata(LLVMContext::MD_noalias), UsedNoAliasScopesAndLists);
+ Track(I->getMetadata(LLVMContext::MD_alias_scope), UsedAliasScopesAndLists,
+ [this](const MDNode *MDScope) {
+ const MDNode *Domain = AliasScopeNode(MDScope).getDomain();
+ if (!Domain || !AliasScopeDomainNode(Domain).hasDisjointScopes())
+ return;
+ auto [It, Inserted] =
+ FirstScopeInDisjointDomain.try_emplace(Domain, MDScope);
+ if (!Inserted && It->second != MDScope)
+ UsedDisjointDomains.insert(Domain);
+ });
+ Track(I->getMetadata(LLVMContext::MD_noalias), UsedNoAliasScopesAndLists,
+ [](const MDNode *) {});
}
bool isNoAliasScopeDeclDead(Instruction *Inst) {
@@ -6011,9 +6027,16 @@ class AliasScopeTracker {
assert(MDSL->getNumOperands() == 1 &&
"llvm.experimental.noalias.scope should refer to a single scope");
auto &MDOperand = MDSL->getOperand(0);
- if (auto *MD = dyn_cast<MDNode>(MDOperand))
- return !UsedAliasScopesAndLists.contains(MD) ||
- !UsedNoAliasScopesAndLists.contains(MD);
+ if (auto *MD = dyn_cast<MDNode>(MDOperand)) {
+ if (!UsedAliasScopesAndLists.contains(MD))
+ return true;
+ // A scope of a domain with disjoint scopes carries an implicit noalias
+ // set, so its declaration matters without a noalias use as long as some
+ // other scope of that domain is used as well.
+ if (UsedDisjointDomains.contains(AliasScopeNode(MD).getDomain()))
+ return false;
+ return !UsedNoAliasScopesAndLists.contains(MD);
+ }
// Not an MDNode ? throw away.
return true;
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index c2a2138148168..d64ba932ba42d 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -1156,6 +1156,20 @@ void llvm::cloneNoAliasScopes(ArrayRef<MDNode *> NoAliasDeclScopes,
StringRef Ext, LLVMContext &Context) {
MDBuilder MDB(Context);
+ // A cloned scope has to go into a clone of its domain if that domain has
+ // disjoint scopes: the copies of a duplicated access are in the same memory
+ // region, so they must not become implicitly noalias with each other.
+ DenseMap<const MDNode *, MDNode *> ClonedDomains;
+ auto GetClonedDomain = [&](const MDNode *Domain) {
+ if (!Domain || !AliasScopeDomainNode(Domain).hasDisjointScopes())
+ return const_cast<MDNode *>(Domain);
+ MDNode *&ClonedDomain = ClonedDomains[Domain];
+ if (!ClonedDomain)
+ ClonedDomain = MDB.createAnonymousAliasScopeDomain(
+ AliasScopeDomainNode(Domain).getName(), /*DisjointScopes=*/true);
+ return ClonedDomain;
+ };
+
for (MDNode *ScopeList : NoAliasDeclScopes) {
for (const MDOperand &MDOp : ScopeList->operands()) {
if (MDNode *MD = dyn_cast<MDNode>(MDOp)) {
@@ -1169,7 +1183,7 @@ void llvm::cloneNoAliasScopes(ArrayRef<MDNode *> NoAliasDeclScopes,
Name = std::string(Ext);
MDNode *NewScope = MDB.createAnonymousAliasScope(
- const_cast<MDNode *>(SNANode.getDomain()), Name);
+ GetClonedDomain(SNANode.getDomain()), Name);
ClonedScopes.insert(std::make_pair(MD, NewScope));
}
}
diff --git a/llvm/test/Analysis/AliasSet/intrinsics.ll b/llvm/test/Analysis/AliasSet/intrinsics.ll
index a0a319ae3e683..4293f6d35dad5 100644
--- a/llvm/test/Analysis/AliasSet/intrinsics.ll
+++ b/llvm/test/Analysis/AliasSet/intrinsics.ll
@@ -110,4 +110,4 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{ !1 }
!1 = distinct !{ !1, !2, !"test5: var" }
-!2 = distinct !{ !2, !"test5" }
+!2 = distinct !{!2, i1 false, !"test5"}
diff --git a/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll b/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
index 99b0c6e38cf37..559b1f799b910 100644
--- a/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
+++ b/llvm/test/Analysis/BasicAA/noalias-scope-decl.ll
@@ -27,4 +27,4 @@ attributes #0 = { nounwind }
!0 = !{ !1 }
!1 = distinct !{ !1, !2, !"test1: var" }
-!2 = distinct !{ !2, !"test1" }
+!2 = distinct !{!2, i1 false, !"test1"}
diff --git a/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll b/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
index ff728ddf45d19..ea734e8e97862 100644
--- a/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
+++ b/llvm/test/Analysis/CostModel/X86/free-intrinsics.ll
@@ -77,7 +77,7 @@ declare void @llvm.var.annotation(ptr, ptr, ptr, i32, ptr)
!3 = !DIFile(filename: "debug-label.c", directory: "./")
!4 = !{ !5 }
!5 = distinct !{ !5, !6, !"foo: var" }
-!6 = distinct !{ !6, !"foo" }
+!6 = distinct !{!6, i1 false, !"foo"}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !DILocation(line: 0, scope: !1)
!9 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, producer: "clang")
diff --git a/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll b/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
index 5503cc37de130..014916cc00d2a 100644
--- a/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
+++ b/llvm/test/Analysis/CostModel/free-intrinsics-datalayout.ll
@@ -85,7 +85,7 @@ declare void @llvm.var.annotation(ptr, ptr, ptr, i32, ptr)
!3 = !DIFile(filename: "debug-label.c", directory: "./")
!4 = !{ !5 }
!5 = distinct !{ !5, !6, !"foo: var" }
-!6 = distinct !{ !6, !"foo" }
+!6 = distinct !{!6, i1 false, !"foo"}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !DILocation(line: 0, scope: !1)
!9 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, producer: "clang")
diff --git a/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll b/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
index e868ebc3735a3..953ec9e158bef 100644
--- a/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
+++ b/llvm/test/Analysis/CostModel/free-intrinsics-no_info.ll
@@ -83,7 +83,7 @@ declare void @llvm.var.annotation(ptr, ptr, ptr, i32, ptr)
!3 = !DIFile(filename: "debug-label.c", directory: "./")
!4 = !{ !5 }
!5 = distinct !{ !5, !6, !"foo: var" }
-!6 = distinct !{ !6, !"foo" }
+!6 = distinct !{!6, i1 false, !"foo"}
!7 = !{i32 2, !"Debug Info Version", i32 3}
!8 = !DILocation(line: 0, scope: !1)
!9 = distinct !DICompileUnit(language: DW_LANG_C11, file: !3, producer: "clang")
diff --git a/llvm/test/Analysis/LoopAccessAnalysis/noalias-scope-decl.ll b/llvm/test/Analysis/LoopAccessAnalysis/noalias-scope-decl.ll
index df0695f216aa4..738042e852407 100644
--- a/llvm/test/Analysis/LoopAccessAnalysis/noalias-scope-decl.ll
+++ b/llvm/test/Analysis/LoopAccessAnalysis/noalias-scope-decl.ll
@@ -97,7 +97,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
!3 = !{!4}
!4 = distinct !{!4, !5}
-!5 = distinct !{!5}
+!5 = distinct !{!5, i1 false}
diff --git a/llvm/test/Analysis/MemorySSA/noalias-scope-decl.ll b/llvm/test/Analysis/MemorySSA/noalias-scope-decl.ll
index c17b78c920eaf..0c2dc859b0ca0 100644
--- a/llvm/test/Analysis/MemorySSA/noalias-scope-decl.ll
+++ b/llvm/test/Analysis/MemorySSA/noalias-scope-decl.ll
@@ -20,4 +20,4 @@ define i32 @foo(ptr %a, ptr %b, i1 %c) {
!0 = !{ !1 }
!1 = distinct !{ !1, !2, !"foo: var" }
-!2 = distinct !{ !2, !"foo" }
+!2 = distinct !{!2, i1 false, !"foo"}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/alias-scope-merging.ll b/llvm/test/Analysis/ScopedNoAliasAA/alias-scope-merging.ll
index 36d79f9e44b96..3d74cc82f05a5 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/alias-scope-merging.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/alias-scope-merging.ll
@@ -30,11 +30,11 @@ declare void @llvm.memcpy.p0.p0.i64(ptr, ptr, i64, i1)
!0 = !{!1, !7}
!1 = distinct !{!1, !3, !"callee0: %a"}
!2 = distinct !{!2, !3, !"callee0: %b"}
-!3 = distinct !{!3, !"callee0"}
+!3 = distinct !{!3, i1 false, !"callee0"}
!4 = !{!2, !5}
!5 = distinct !{!5, !6, !"callee1: %a"}
-!6 = distinct !{!6, !"callee1"}
+!6 = distinct !{!6, i1 false, !"callee1"}
!7 = distinct !{!7, !8, !"callee2: %a"}
-!8 = distinct !{!8, !"callee2"}
+!8 = distinct !{!8, i1 false, !"callee2"}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/basic-domains.ll b/llvm/test/Analysis/ScopedNoAliasAA/basic-domains.ll
index 9f417a6e373c1..64f5f4e6e670a 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/basic-domains.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/basic-domains.ll
@@ -22,8 +22,8 @@ entry:
attributes #0 = { nounwind uwtable }
-!2 = !{!2, !"some domain"}
-!5 = !{!5, !"some other domain"}
+!2 = !{!2, i1 false, !"some domain"}
+!5 = !{!5, i1 false, !"some other domain"}
; Two scopes (which must be self-referential to avoid being "uniqued"):
!1 = !{!1, !2, !"a scope in dom0"}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/basic.ll b/llvm/test/Analysis/ScopedNoAliasAA/basic.ll
index e7f1a5f147035..1baeee47b106c 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/basic.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/basic.ll
@@ -22,6 +22,6 @@ entry:
attributes #0 = { nounwind uwtable }
-!0 = !{!0, !"some domain"}
+!0 = !{!0, i1 false, !"some domain"}
!1 = !{!1, !0, !"some scope"}
!2 = !{!1}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/basic2.ll b/llvm/test/Analysis/ScopedNoAliasAA/basic2.ll
index 751d0452baa53..5df253d76daaa 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/basic2.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/basic2.ll
@@ -34,7 +34,7 @@ attributes #0 = { nounwind uwtable }
!0 = !{!1, !3}
!1 = !{!1, !2, !"some scope"}
-!2 = !{!2, !"some domain"}
+!2 = !{!2, i1 false, !"some domain"}
!3 = !{!3, !2, !"some other scope"}
!4 = !{!1}
!5 = !{!3}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll b/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
new file mode 100644
index 0000000000000..9b807d0fe85e4
--- /dev/null
+++ b/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
@@ -0,0 +1,71 @@
+; RUN: opt < %s -aa-pipeline=basic-aa,scoped-noalias-aa -passes=aa-eval -evaluate-aa-metadata -print-all-alias-modref-info -disable-output 2>&1 | FileCheck %s
+
+define void @foo1(ptr nocapture %a, ptr nocapture readonly %c) {
+entry:
+; CHECK-LABEL: Function: foo1
+ %0 = load float, ptr %c, align 4, !alias.scope !3
+ %arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
+ store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
+
+; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+ ret void
+}
+
+define void @foo2(ptr nocapture %a, ptr nocapture readonly %c) {
+entry:
+; CHECK-LABEL: Function: foo2
+ %0 = load float, ptr %c, align 4, !alias.scope !6
+ %arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
+ store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+ %arrayidx.i2 = getelementptr inbounds float, ptr %a, i64 15
+ store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5
+
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
+; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5
+; CHECK: NoAlias: store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
+ ret void
+}
+
+define void @foo3(ptr nocapture %a, ptr nocapture readonly %c) {
+entry:
+; CHECK-LABEL: Function: foo3
+ %0 = load float, ptr %c, align 4, !alias.scope !9
+ %arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
+ store float %0, ptr %arrayidx.i, align 4, !alias.scope !10
+
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+ ret void
+}
+
+define void @foo4(ptr nocapture %a, ptr nocapture readonly %c) {
+entry:
+; CHECK-LABEL: Function: foo4
+ %0 = load float, ptr %c, align 4, !alias.scope !3
+ %arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
+ store float %0, ptr %arrayidx.i, align 4, !alias.scope !13
+
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+ ret void
+}
+
+!0 = !{!0, i1 true, !"disjoint domain"}
+!1 = !{!1, !0, !"scope 1"}
+!2 = !{!2, !0, !"scope 2"}
+!12 = !{!12, !0, !"scope 3"}
+
+!3 = !{!1}
+!4 = !{!2}
+!5 = !{!12}
+!6 = !{!1, !2}
+
+!7 = !{!7, i1 false, !"plain domain"}
+!8 = !{!8, !7, !"scope 1"}
+!11 = !{!11, !7, !"scope 2"}
+
+!9 = !{!8}
+!10 = !{!11}
+
+!14 = !{!14, i1 true, !"another disjoint domain"}
+!15 = !{!15, !14, !"scope 1"}
+
+!13 = !{!15}
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/fence-modref.ll b/llvm/test/Analysis/ScopedNoAliasAA/fence-modref.ll
index 0ac6fa2fe2fac..bb7a069ed221b 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/fence-modref.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/fence-modref.ll
@@ -64,7 +64,7 @@ define i32 @fence_partial_noalias(ptr %p) {
!0 = !{!1}
!1 = distinct !{!1, !2, !"arg_scope"}
-!2 = distinct !{!2, !"kernel_domain"}
+!2 = distinct !{!2, i1 false, !"kernel_domain"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"other_arg_scope"}
!5 = !{!1, !4}
diff --git a/llvm/test/Assembler/incomplete-ir-metadata.ll b/llvm/test/Assembler/incomplete-ir-metadata.ll
index fdf7b4ee0ebd2..e45b252a12949 100644
--- a/llvm/test/Assembler/incomplete-ir-metadata.ll
+++ b/llvm/test/Assembler/incomplete-ir-metadata.ll
@@ -26,9 +26,9 @@ declare void @llvm.dbg.value(metadata, metadata, metadata)
!100 = !{!101}
!101 = !{!101, !102}
-!102 = !{!102}
+!102 = !{!102, i1 false}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]]}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false}
;.
diff --git a/llvm/test/Bitcode/upgrade-alias-scope-domains.ll b/llvm/test/Bitcode/upgrade-alias-scope-domains.ll
new file mode 100644
index 0000000000000..b32604a572b3b
--- /dev/null
+++ b/llvm/test/Bitcode/upgrade-alias-scope-domains.ll
@@ -0,0 +1,56 @@
+; RUN: llvm-as -disable-verify < %s | llvm-dis | FileCheck %s
+
+define void @test(ptr %p, ptr %q) {
+; CHECK-LABEL: define void @test(
+; CHECK: call void @llvm.experimental.noalias.scope.decl(metadata [[SELF_SCOPES:![0-9]+]])
+; CHECK: load i8, ptr %p, align 1, !alias.scope [[SELF_SCOPES]], !noalias [[NAMED_SCOPES:![0-9]+]]
+; CHECK: store i8 %v, ptr %q, align 1, !alias.scope [[NAMED_SCOPES]], !noalias [[SELF_SCOPES]]
+ call void @llvm.experimental.noalias.scope.decl(metadata !0)
+ %v = load i8, ptr %p, !alias.scope !0, !noalias !3
+ store i8 %v, ptr %q, !alias.scope !3, !noalias !0
+ ret void
+}
+
+define void @shares_the_domain(ptr %p, ptr %q) {
+; CHECK-LABEL: define void @shares_the_domain(
+; CHECK: load i8, ptr %p, align 1, !alias.scope [[SELF_SCOPES]], !noalias [[NAMED_SCOPES]]
+ %v = load i8, ptr %p, !alias.scope !0, !noalias !3
+ ret void
+}
+
+declare void @llvm.experimental.noalias.scope.decl(metadata)
+
+!0 = !{!1}
+!1 = distinct !{!1, !2, !"self-referential scope"}
+!2 = distinct !{!2, !"self-referential domain"}
+!3 = !{!4}
+!4 = !{!"named scope", !5}
+!5 = !{!"named domain"}
+!6 = !{!7}
+!7 = distinct !{!"same name", !8}
+!8 = distinct !{!"same domain name"}
+!9 = !{!10}
+!10 = distinct !{!"same name", !11}
+!11 = distinct !{!"same domain name"}
+
+define void @distinct_domains_sharing_a_name(ptr %p, ptr %q) {
+; CHECK-LABEL: define void @distinct_domains_sharing_a_name(
+; CHECK: load i8, ptr %p, align 1, !alias.scope [[SCOPES_A:![0-9]+]]
+; CHECK: store i8 %v, ptr %q, align 1, !noalias [[SCOPES_B:![0-9]+]]
+ %v = load i8, ptr %p, !alias.scope !6
+ store i8 %v, ptr %q, !noalias !9
+ ret void
+}
+
+; CHECK-DAG: [[SELF_SCOPES]] = !{[[SELF_SCOPE:![0-9]+]]}
+; CHECK-DAG: [[SELF_SCOPE]] = distinct !{[[SELF_SCOPE]], [[SELF_DOMAIN:![0-9]+]], !"self-referential scope"}
+; CHECK-DAG: [[SELF_DOMAIN]] = distinct !{[[SELF_DOMAIN]], i1 false, !"self-referential domain"}
+; CHECK-DAG: [[NAMED_SCOPES]] = !{[[NAMED_SCOPE:![0-9]+]]}
+; CHECK-DAG: [[NAMED_SCOPE]] = !{!"named scope", [[NAMED_DOMAIN:![0-9]+]]}
+; CHECK-DAG: [[NAMED_DOMAIN]] = !{!"named domain", i1 false}
+; CHECK-DAG: [[SCOPES_A]] = !{[[SCOPE_A:![0-9]+]]}
+; CHECK-DAG: [[SCOPE_A]] = distinct !{!"same name", [[DOMAIN_A:![0-9]+]]}
+; CHECK-DAG: [[DOMAIN_A]] = distinct !{!"same domain name", i1 false}
+; CHECK-DAG: [[SCOPES_B]] = !{[[SCOPE_B:![0-9]+]]}
+; CHECK-DAG: [[SCOPE_B]] = distinct !{!"same name", [[DOMAIN_B:![0-9]+]]}
+; CHECK-DAG: [[DOMAIN_B]] = distinct !{!"same domain name", i1 false}
diff --git a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
index 29c70461a7ce6..1e8e0024907b7 100644
--- a/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
+++ b/llvm/test/CodeGen/AArch64/GlobalISel/arm64-irtranslator.ll
@@ -2502,7 +2502,7 @@ define void @test.llvm.noalias.scope.decl(ptr %P, ptr %Q) nounwind ssp {
!3 = !{ !4 }
!4 = distinct !{ !4, !5, !"test1: var" }
-!5 = distinct !{ !5, !"test1" }
+!5 = distinct !{!5, i1 false, !"test1"}
declare void @llvm.sideeffect()
diff --git a/llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll b/llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
index cc27fd75a8b20..880830e14f36f 100644
--- a/llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
+++ b/llvm/test/CodeGen/AArch64/memcpy-scoped-aa.ll
@@ -2,7 +2,7 @@
; RUN: llc -mtriple=aarch64-linux-gnu -o - %s | FileCheck %s
; RUN: llc -mtriple=aarch64-linux-gnu -stop-after=finalize-isel -o - %s | FileCheck --check-prefix=MIR %s
-; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"bax"}
+; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"bax"}
; MIR-DAG: ![[SCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %p"}
; MIR-DAG: ![[SCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %q"}
; MIR-DAG: ![[SET0:[0-9]+]] = !{![[SCOPE0]]}
@@ -128,7 +128,7 @@ declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg)
declare ptr @mempcpy(ptr, ptr, i64)
-!0 = distinct !{!0, !"bax"}
+!0 = distinct !{!0, i1 false, !"bax"}
!1 = distinct !{!1, !0, !"bax: %p"}
!2 = !{!1}
!3 = distinct !{!3, !0, !"bax: %q"}
diff --git a/llvm/test/CodeGen/AArch64/merge-scoped-aa-store.ll b/llvm/test/CodeGen/AArch64/merge-scoped-aa-store.ll
index 6b2a8c5aaf8b8..6bf12acd6ee27 100644
--- a/llvm/test/CodeGen/AArch64/merge-scoped-aa-store.ll
+++ b/llvm/test/CodeGen/AArch64/merge-scoped-aa-store.ll
@@ -3,7 +3,7 @@
; Ensure the scoped AA metadata is still retained after store merging.
-; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"domain"}
+; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"domain"}
; MIR-DAG: ![[SCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"scope 0"}
; MIR-DAG: ![[SCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"scope 1"}
; MIR-DAG: ![[SCOPE2:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"scope 2"}
@@ -60,7 +60,7 @@ define void @blam1(ptr %g0, ptr %g1) {
!1 = !{!3}
!2 = !{!2, !4, !"scope 0"}
!3 = !{!3, !4, !"scope 1"}
-!4 = !{!4, !"domain"}
+!4 = !{!4, i1 false, !"domain"}
!5 = !{!7}
!6 = !{!8}
!7 = !{!7, !4, !"scope 2"}
diff --git a/llvm/test/CodeGen/AArch64/vector_merge_dep_check.ll b/llvm/test/CodeGen/AArch64/vector_merge_dep_check.ll
index 89b3b8906f7d2..4bc19e955cd2b 100644
--- a/llvm/test/CodeGen/AArch64/vector_merge_dep_check.ll
+++ b/llvm/test/CodeGen/AArch64/vector_merge_dep_check.ll
@@ -30,7 +30,7 @@ attributes #0 = { noinline norecurse nounwind ssp uwtable "disable-tail-calls"="
!0 = !{!"Snapdragon LLVM ARM Compiler 3.8.0 (based on LLVM 3.8.0)"}
!1 = distinct !{!1, !2, !"polly.alias.scope.rhs"}
-!2 = distinct !{!2, !"polly.alias.scope.domain"}
+!2 = distinct !{!2, i1 false, !"polly.alias.scope.domain"}
!3 = !{!4, !5, !6, !7, !8}
!4 = distinct !{!4, !2, !"polly.alias.scope.blockB"}
!5 = distinct !{!5, !2, !"polly.alias.scope.add28.lcssa.reg2mem"}
diff --git a/llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll b/llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll
index a958563be4007..081a1bb71e287 100644
--- a/llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll
+++ b/llvm/test/CodeGen/AMDGPU/lds-dma-workgroup-release.ll
@@ -513,7 +513,7 @@ main_body:
ret void
}
-!100 = !{!100}
+!100 = !{!100, i1 false}
!101 = !{!101, !100}
!102 = !{!101}
!103 = !{!103, !100}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll b/llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll
index c336d5d370621..0fc6b5c0d7e83 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-intrinsics-noalias-metadata.ll
@@ -166,7 +166,7 @@ bb:
declare void @llvm.amdgcn.s.barrier()
declare void @llvm.amdgcn.s.cluster.barrier()
-!0 = distinct !{!0, !"domain"}
+!0 = distinct !{!0, i1 false, !"domain"}
!2 = distinct !{!2, !0, !"global_scope"}
!3 = distinct !{!3, !0, !"lds_scope"}
!1 = !{!2}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-kernargs.ll b/llvm/test/CodeGen/AMDGPU/lower-kernargs.ll
index 3abeae4c34fa1..b166549089f34 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernargs.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernargs.ll
@@ -36,7 +36,7 @@ define amdgpu_kernel void @kern_i8_noundef(i8 noundef %arg) #0 {
; HSA-LABEL: @kern_i8_noundef(
; HSA-NEXT: [[KERN_I8_NOUNDEF_KERNARG_SEGMENT:%.*]] = call nonnull align 16 dereferenceable(264) ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr()
; HSA-NEXT: [[ARG_KERNARG_OFFSET_ALIGN_DOWN:%.*]] = getelementptr inbounds i8, ptr addrspace(4) [[KERN_I8_NOUNDEF_KERNARG_SEGMENT]], i64 0
-; HSA-NEXT: [[TMP1:%.*]] = load i32, ptr addrspace(4) [[ARG_KERNARG_OFFSET_ALIGN_DOWN]], align 16, !invariant.load [[META0]]{{$}}
+; HSA-NEXT: [[TMP1:%.*]] = load i32, ptr addrspace(4) [[ARG_KERNARG_OFFSET_ALIGN_DOWN]], align 16, !invariant.load [[META0]]
; HSA-NEXT: [[TMP2:%.*]] = trunc i32 [[TMP1]] to i8
; HSA-NEXT: store i8 [[TMP2]], ptr addrspace(1) poison, align 1
; HSA-NEXT: ret void
@@ -44,7 +44,7 @@ define amdgpu_kernel void @kern_i8_noundef(i8 noundef %arg) #0 {
; MESA-LABEL: @kern_i8_noundef(
; MESA-NEXT: [[KERN_I8_NOUNDEF_KERNARG_SEGMENT:%.*]] = call nonnull align 16 dereferenceable(260) ptr addrspace(4) @llvm.amdgcn.kernarg.segment.ptr()
; MESA-NEXT: [[ARG_KERNARG_OFFSET_ALIGN_DOWN:%.*]] = getelementptr inbounds i8, ptr addrspace(4) [[KERN_I8_NOUNDEF_KERNARG_SEGMENT]], i64 36
-; MESA-NEXT: [[TMP1:%.*]] = load i32, ptr addrspace(4) [[ARG_KERNARG_OFFSET_ALIGN_DOWN]], align 4, !invariant.load [[META0]]{{$}}
+; MESA-NEXT: [[TMP1:%.*]] = load i32, ptr addrspace(4) [[ARG_KERNARG_OFFSET_ALIGN_DOWN]], align 4, !invariant.load [[META0]]
; MESA-NEXT: [[TMP2:%.*]] = trunc i32 [[TMP1]] to i8
; MESA-NEXT: store i8 [[TMP2]], ptr addrspace(1) poison, align 1
; MESA-NEXT: ret void
@@ -1928,10 +1928,10 @@ attributes #1 = { nounwind "amdgpu-implicitarg-num-bytes"="40" }
; HSA: [[META5]] = !{i64 1024}
; HSA: [[META6]] = !{[[META7:![0-9]+]]}
; HSA: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"ptr"}
-; HSA: [[META8]] = distinct !{[[META8]], !"kern_noalias_global_ptr"}
+; HSA: [[META8]] = distinct !{[[META8]], i1 false, !"kern_noalias_global_ptr"}
; HSA: [[META9]] = !{[[META10:![0-9]+]], [[META12:![0-9]+]]}
; HSA: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"ptr0"}
-; HSA: [[META11]] = distinct !{[[META11]], !"kern_noalias_global_ptr_x2"}
+; HSA: [[META11]] = distinct !{[[META11]], i1 false, !"kern_noalias_global_ptr_x2"}
; HSA: [[META12]] = distinct !{[[META12]], [[META11]], !"ptr1"}
;.
; MESA: [[META0]] = !{}
@@ -1942,9 +1942,9 @@ attributes #1 = { nounwind "amdgpu-implicitarg-num-bytes"="40" }
; MESA: [[META5]] = !{i64 1024}
; MESA: [[META6]] = !{[[META7:![0-9]+]]}
; MESA: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"ptr"}
-; MESA: [[META8]] = distinct !{[[META8]], !"kern_noalias_global_ptr"}
+; MESA: [[META8]] = distinct !{[[META8]], i1 false, !"kern_noalias_global_ptr"}
; MESA: [[META9]] = !{[[META10:![0-9]+]], [[META12:![0-9]+]]}
; MESA: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"ptr0"}
-; MESA: [[META11]] = distinct !{[[META11]], !"kern_noalias_global_ptr_x2"}
+; MESA: [[META11]] = distinct !{[[META11]], i1 false, !"kern_noalias_global_ptr_x2"}
; MESA: [[META12]] = distinct !{[[META12]], [[META11]], !"ptr1"}
;.
diff --git a/llvm/test/CodeGen/AMDGPU/lower-kernel-arguments-noalias-call-no-ptr-args.ll b/llvm/test/CodeGen/AMDGPU/lower-kernel-arguments-noalias-call-no-ptr-args.ll
index b68e65bd75b8d..63e664bbab67a 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-kernel-arguments-noalias-call-no-ptr-args.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-kernel-arguments-noalias-call-no-ptr-args.ll
@@ -112,22 +112,22 @@ attributes #4 = { nounwind memory(argmem: readwrite) }
; CHECK: [[META0]] = !{}
; CHECK: [[META1]] = !{[[META2:![0-9]+]], [[META4:![0-9]+]]}
; CHECK: [[META2]] = distinct !{[[META2]], [[META3:![0-9]+]], !"out"}
-; CHECK: [[META3]] = distinct !{[[META3]], !"call_without_ptr_args"}
+; CHECK: [[META3]] = distinct !{[[META3]], i1 false, !"call_without_ptr_args"}
; CHECK: [[META4]] = distinct !{[[META4]], [[META3]], !"in"}
; CHECK: [[META5]] = !{[[META4]]}
; CHECK: [[META6]] = !{[[META2]]}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]], !"out"}
-; CHECK: [[META9]] = distinct !{[[META9]], !"readnone_call_without_ptr_args"}
+; CHECK: [[META9]] = distinct !{[[META9]], i1 false, !"readnone_call_without_ptr_args"}
; CHECK: [[META10]] = !{[[META11:![0-9]+]], [[META13:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]], !"out"}
-; CHECK: [[META12]] = distinct !{[[META12]], !"argmemonly_call_without_ptr_args"}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false, !"argmemonly_call_without_ptr_args"}
; CHECK: [[META13]] = distinct !{[[META13]], [[META12]], !"in"}
; CHECK: [[META14]] = !{[[META13]]}
; CHECK: [[META15]] = !{[[META11]]}
; CHECK: [[META16]] = !{[[META17:![0-9]+]]}
; CHECK: [[META17]] = distinct !{[[META17]], [[META18:![0-9]+]], !"in"}
-; CHECK: [[META18]] = distinct !{[[META18]], !"argmemonly_call_with_ptr_arg"}
+; CHECK: [[META18]] = distinct !{[[META18]], i1 false, !"argmemonly_call_with_ptr_arg"}
; CHECK: [[META19]] = !{[[META20:![0-9]+]]}
; CHECK: [[META20]] = distinct !{[[META20]], [[META18]], !"out"}
;.
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
index db9fbd829ccaa..4e3e90aee02d4 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-memcpy.ll
@@ -71,7 +71,7 @@ declare void @llvm.memcpy.p3.p3.i64(ptr addrspace(3) noalias nocapture writeonly
; CHECK: [[META0:![0-9]+]] = !{i32 0, i32 1}
; CHECK: [[META1:![0-9]+]] = !{!2}
; CHECK: [[META2:![0-9]+]] = distinct !{!2, !3}
-; CHECK: [[META3:![0-9]+]] = distinct !{!3}
+; CHECK: [[META3:![0-9]+]] = distinct !{!3, i1 false}
; CHECK: [[META4:![0-9]+]] = !{!5}
; CHECK: [[META5:![0-9]+]] = distinct !{!5, !3}
; CHECK: [[META6:![0-9]+]] = !{!5, !2}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
index b0857db98ef83..0ba0ca8f98511 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
@@ -12,8 +12,8 @@ define amdgpu_kernel void @no_clobber_ds_load_stores_x2_preexisting_aa(ptr addrs
; CHECK-NEXT: store i32 1, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, align 16, !tbaa [[TBAA1:![0-9]+]], !noalias [[META6:![0-9]+]]
; CHECK-NEXT: [[GEP_A:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 [[I]]
; CHECK-NEXT: [[VAL_A:%.*]] = load i32, ptr addrspace(3) [[GEP_A]], align 4, !tbaa [[TBAA1]], !noalias [[META6]]
-; CHECK-NEXT: store i32 2, ptr addrspace(3) getelementptr inbounds (i8, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 256), align 16, !tbaa [[TBAA1]], !noalias [[META11:![0-9]+]]
-; CHECK-NEXT: [[GEP_B:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) getelementptr inbounds (i8, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 256), i32 0, i32 [[I]]
+; CHECK-NEXT: store i32 2, ptr addrspace(3) getelementptr inbounds ([[LLVM_AMDGCN_KERNEL_NO_CLOBBER_DS_LOAD_STORES_X2_PREEXISTING_AA_LDS_T:%.*]], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 1), align 16, !tbaa [[TBAA1]], !noalias [[META11:![0-9]+]]
+; CHECK-NEXT: [[GEP_B:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) getelementptr inbounds ([[LLVM_AMDGCN_KERNEL_NO_CLOBBER_DS_LOAD_STORES_X2_PREEXISTING_AA_LDS_T]], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 1), i32 0, i32 [[I]]
; CHECK-NEXT: [[VAL_B:%.*]] = load i32, ptr addrspace(3) [[GEP_B]], align 4, !tbaa [[TBAA1]], !noalias [[META11]]
; CHECK-NEXT: [[VAL:%.*]] = add i32 [[VAL_A]], [[VAL_B]]
; CHECK-NEXT: store i32 [[VAL]], ptr addrspace(1) [[ARG]], align 4
@@ -33,7 +33,7 @@ bb:
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
!3 = !{!4}
!4 = distinct !{!4, !2}
!5 = !{!6, !7, i64 0}
@@ -50,9 +50,9 @@ bb:
; CHECK:!5 = !{!"Simple C++ TBAA"}
; CHECK:!6 = !{!7, !9}
; CHECK:!7 = distinct !{!7, !8}
-; CHECK:!8 = distinct !{!8}
+; CHECK:!8 = distinct !{!8, i1 false}
; CHECK:!9 = distinct !{!9, !10}
-; CHECK:!10 = distinct !{!10}
+; CHECK:!10 = distinct !{!10, i1 false}
; CHECK:!11 = !{!12, !13}
; CHECK:!12 = distinct !{!12, !8}
; CHECK:!13 = distinct !{!13, !10}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa.ll
index 29816d20b6e96..5cb7816c9e390 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa.ll
@@ -113,12 +113,12 @@ bb:
; CHECK: !0 = !{i32 0, i32 1}
; CHECK: !1 = !{!2}
; CHECK: !2 = distinct !{!2, !3}
-; CHECK: !3 = distinct !{!3}
+; CHECK: !3 = distinct !{!3, i1 false}
; CHECK: !4 = !{!5}
; CHECK: !5 = distinct !{!5, !3}
; CHECK: !6 = !{!7}
; CHECK: !7 = distinct !{!7, !8}
-; CHECK: !8 = distinct !{!8}
+; CHECK: !8 = distinct !{!8, i1 false}
; CHECK: !9 = !{!10, !11}
; CHECK: !10 = distinct !{!10, !8}
; CHECK: !11 = distinct !{!11, !8}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-with-alias-scope.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-with-alias-scope.ll
index 7daee933f96c1..577e47ee52adf 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-with-alias-scope.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-with-alias-scope.ll
@@ -48,7 +48,7 @@ bb:
!1 = !{!1}
!2 = !{!3}
!3 = distinct !{!3, !4}
- !4 = distinct !{!4}
+ !4 = distinct !{!4, i1 false}
!5 = !{!3}
!6 = !{!7}
!7 = !{!7, !4}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-with-noalias.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-with-noalias.ll
index b2c13ec965fbe..cde7b63fd2e15 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-with-noalias.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-with-noalias.ll
@@ -65,7 +65,7 @@ bb:
!1 = !{!1}
!2 = !{!3}
!3 = distinct !{!3, !4}
- !4 = distinct !{!4}
+ !4 = distinct !{!4, i1 false}
!5 = !{!3}
!6 = !{!"omnipotent char", !1}
;.
@@ -74,10 +74,10 @@ bb:
; CHECK: [[META3]] = distinct !{[[META3]]}
; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META6:![0-9]+]]}
-; CHECK: [[META6]] = distinct !{[[META6]]}
+; CHECK: [[META6]] = distinct !{[[META6]], i1 false}
; CHECK: [[META7]] = !{[[META8:![0-9]+]], [[META10:![0-9]+]], [[META11:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]]}
-; CHECK: [[META9]] = distinct !{[[META9]]}
+; CHECK: [[META9]] = distinct !{[[META9]], i1 false}
; CHECK: [[META10]] = distinct !{[[META10]], [[META6]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META6]]}
; CHECK: [[META12]] = !{[[META10]]}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
index 9e05817689aa1..b0cce1a84fef2 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-module-lds-via-hybrid.ll
@@ -313,13 +313,13 @@ define amdgpu_kernel void @k123() {
; OPT: !4 = !{i32 1}
; OPT: !5 = !{!6}
; OPT: !6 = distinct !{!6, !7}
-; OPT: !7 = distinct !{!7}
+; OPT: !7 = distinct !{!7, i1 false}
; OPT: !8 = !{!9}
; OPT: !9 = distinct !{!9, !7}
; OPT: !10 = !{i32 0}
; OPT: !11 = !{!12}
; OPT: !12 = distinct !{!12, !13}
-; OPT: !13 = distinct !{!13}
+; OPT: !13 = distinct !{!13, i1 false}
; OPT: !14 = !{!15}
; OPT: !15 = distinct !{!15, !13}
diff --git a/llvm/test/CodeGen/AMDGPU/lower-noalias-kernargs.ll b/llvm/test/CodeGen/AMDGPU/lower-noalias-kernargs.ll
index 19a2fecd7a470..4411c0021ba80 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-noalias-kernargs.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-noalias-kernargs.ll
@@ -547,7 +547,7 @@ attributes #2 = { nounwind readnone speculatable }
attributes #3 = { nounwind memory(argmem: readwrite) }
attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
-!0 = distinct !{!0, !"alias_scope_0"}
+!0 = distinct !{!0, i1 false, !"alias_scope_0"}
!1 = distinct !{!1, !0, !"alias_scope_1"}
!2 = !{!1}
!3 = distinct !{!3, !0, !"alias_scope_3"}
@@ -556,22 +556,22 @@ attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
; CHECK: [[META0]] = !{}
; CHECK: [[META1]] = !{[[META2:![0-9]+]]}
; CHECK: [[META2]] = distinct !{[[META2]], [[META3:![0-9]+]], !"in"}
-; CHECK: [[META3]] = distinct !{[[META3]], !"aliasinfo_2i32_NA"}
+; CHECK: [[META3]] = distinct !{[[META3]], i1 false, !"aliasinfo_2i32_NA"}
; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META3]], !"out"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"alias_scope_3"}
-; CHECK: [[META8]] = distinct !{[[META8]], !"alias_scope_0"}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false, !"alias_scope_0"}
; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK: [[META10]] = distinct !{[[META10]], [[META8]], !"alias_scope_1"}
; CHECK: [[META11]] = !{[[META7]], [[META12:![0-9]+]]}
; CHECK: [[META12]] = distinct !{[[META12]], [[META13:![0-9]+]], !"in"}
-; CHECK: [[META13]] = distinct !{[[META13]], !"aliasinfo_2i32_NA_AS"}
+; CHECK: [[META13]] = distinct !{[[META13]], i1 false, !"aliasinfo_2i32_NA_AS"}
; CHECK: [[META14]] = !{[[META10]], [[META15:![0-9]+]]}
; CHECK: [[META15]] = distinct !{[[META15]], [[META13]], !"out"}
; CHECK: [[META16]] = !{[[META17:![0-9]+]]}
; CHECK: [[META17]] = distinct !{[[META17]], [[META18:![0-9]+]], !"in"}
-; CHECK: [[META18]] = distinct !{[[META18]], !"aliasinfo_v4f32_3v4i8_NA"}
+; CHECK: [[META18]] = distinct !{[[META18]], i1 false, !"aliasinfo_v4f32_3v4i8_NA"}
; CHECK: [[META19]] = !{[[META20:![0-9]+]], [[META21:![0-9]+]], [[META22:![0-9]+]]}
; CHECK: [[META20]] = distinct !{[[META20]], [[META18]], !"out"}
; CHECK: [[META21]] = distinct !{[[META21]], [[META18]], !"out1"}
@@ -584,7 +584,7 @@ attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
; CHECK: [[META28]] = !{[[META20]], [[META17]], [[META22]]}
; CHECK: [[META29]] = !{[[META7]], [[META30:![0-9]+]]}
; CHECK: [[META30]] = distinct !{[[META30]], [[META31:![0-9]+]], !"in"}
-; CHECK: [[META31]] = distinct !{[[META31]], !"aliasinfo_v4f32_3v4i8_NA_AS"}
+; CHECK: [[META31]] = distinct !{[[META31]], i1 false, !"aliasinfo_v4f32_3v4i8_NA_AS"}
; CHECK: [[META32]] = !{[[META10]], [[META33:![0-9]+]], [[META34:![0-9]+]], [[META35:![0-9]+]]}
; CHECK: [[META33]] = distinct !{[[META33]], [[META31]], !"out"}
; CHECK: [[META34]] = distinct !{[[META34]], [[META31]], !"out1"}
@@ -597,7 +597,7 @@ attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
; CHECK: [[META41]] = !{[[META7]], [[META33]], [[META30]], [[META35]]}
; CHECK: [[META42]] = !{[[META43:![0-9]+]], [[META45:![0-9]+]]}
; CHECK: [[META43]] = distinct !{[[META43]], [[META44:![0-9]+]], !"inout"}
-; CHECK: [[META44]] = distinct !{[[META44]], !"aliasinfo_mixed_intrinsics_NA"}
+; CHECK: [[META44]] = distinct !{[[META44]], i1 false, !"aliasinfo_mixed_intrinsics_NA"}
; CHECK: [[META45]] = distinct !{[[META45]], [[META44]], !"out"}
; CHECK: [[META46]] = !{[[META45]]}
; CHECK: [[META47]] = !{[[META48:![0-9]+]]}
@@ -606,7 +606,7 @@ attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
; CHECK: [[META50]] = !{[[META48]], [[META45]]}
; CHECK: [[META51]] = !{[[META10]], [[META52:![0-9]+]], [[META54:![0-9]+]]}
; CHECK: [[META52]] = distinct !{[[META52]], [[META53:![0-9]+]], !"inout"}
-; CHECK: [[META53]] = distinct !{[[META53]], !"aliasinfo_mixed_intrinsics_NA_AS"}
+; CHECK: [[META53]] = distinct !{[[META53]], i1 false, !"aliasinfo_mixed_intrinsics_NA_AS"}
; CHECK: [[META54]] = distinct !{[[META54]], [[META53]], !"out"}
; CHECK: [[META55]] = !{[[META10]], [[META54]]}
; CHECK: [[META56]] = !{[[META7]], [[META57:![0-9]+]]}
@@ -615,26 +615,26 @@ attributes #4 = { nounwind memory(inaccessiblemem: readwrite) }
; CHECK: [[META59]] = !{[[META7]], [[META57]], [[META54]]}
; CHECK: [[META60]] = !{[[META61:![0-9]+]]}
; CHECK: [[META61]] = distinct !{[[META61]], [[META62:![0-9]+]], !"p"}
-; CHECK: [[META62]] = distinct !{[[META62]], !"aliasinfo_captured_before_call"}
+; CHECK: [[META62]] = distinct !{[[META62]], i1 false, !"aliasinfo_captured_before_call"}
; CHECK: [[META63]] = !{[[META64:![0-9]+]]}
; CHECK: [[META64]] = distinct !{[[META64]], [[META65:![0-9]+]], !"p"}
-; CHECK: [[META65]] = distinct !{[[META65]], !"aliasinfo_captured_before_call_ptr_arg"}
+; CHECK: [[META65]] = distinct !{[[META65]], i1 false, !"aliasinfo_captured_before_call_ptr_arg"}
; CHECK: [[META66]] = !{[[META67:![0-9]+]]}
; CHECK: [[META67]] = distinct !{[[META67]], [[META68:![0-9]+]], !"p"}
-; CHECK: [[META68]] = distinct !{[[META68]], !"aliasinfo_captured_after_call"}
+; CHECK: [[META68]] = distinct !{[[META68]], i1 false, !"aliasinfo_captured_after_call"}
; CHECK: [[META69]] = !{[[META70:![0-9]+]]}
; CHECK: [[META70]] = distinct !{[[META70]], [[META71:![0-9]+]], !"p"}
-; CHECK: [[META71]] = distinct !{[[META71]], !"aliasinfo_captured_before_argmemonly_call"}
+; CHECK: [[META71]] = distinct !{[[META71]], i1 false, !"aliasinfo_captured_before_argmemonly_call"}
; CHECK: [[META72]] = !{[[META73:![0-9]+]]}
; CHECK: [[META73]] = distinct !{[[META73]], [[META74:![0-9]+]], !"q"}
-; CHECK: [[META74]] = distinct !{[[META74]], !"aliasinfo_no_scope_on_nonargmem_call"}
+; CHECK: [[META74]] = distinct !{[[META74]], i1 false, !"aliasinfo_no_scope_on_nonargmem_call"}
; CHECK: [[META75]] = !{[[META76:![0-9]+]]}
; CHECK: [[META76]] = distinct !{[[META76]], [[META74]], !"p"}
; CHECK: [[META77]] = !{[[META76]], [[META73]]}
; CHECK: [[META78]] = !{[[META79:![0-9]+]]}
; CHECK: [[META79]] = distinct !{[[META79]], [[META80:![0-9]+]], !"p"}
-; CHECK: [[META80]] = distinct !{[[META80]], !"aliasinfo_inaccessiblemem_call"}
+; CHECK: [[META80]] = distinct !{[[META80]], i1 false, !"aliasinfo_inaccessiblemem_call"}
; CHECK: [[META81]] = !{[[META82:![0-9]+]]}
; CHECK: [[META82]] = distinct !{[[META82]], [[META83:![0-9]+]], !"p"}
-; CHECK: [[META83]] = distinct !{[[META83]], !"aliasinfo_unknown_object_deep_gep"}
+; CHECK: [[META83]] = distinct !{[[META83]], i1 false, !"aliasinfo_unknown_object_deep_gep"}
;.
diff --git a/llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll b/llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
index b401cb5961855..0990f92266567 100644
--- a/llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
+++ b/llvm/test/CodeGen/AMDGPU/memcpy-scoped-aa.ll
@@ -5,7 +5,7 @@
; Re-evaluate the slot numbers of scopes as that numbering could be changed run-by-run.
-; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"bax"}
+; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"bax"}
; MIR-DAG: ![[SCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %p"}
; MIR-DAG: ![[SCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %q"}
; MIR-DAG: ![[SET0:[0-9]+]] = !{![[SCOPE0]]}
@@ -94,7 +94,7 @@ declare void @llvm.memcpy.inline.p1.p1.i64(ptr addrspace(1) noalias nocapture wr
declare void @llvm.memmove.p1.p1.i64(ptr addrspace(1) nocapture writeonly, ptr addrspace(1) nocapture readonly, i64, i1 immarg)
declare void @llvm.memset.p1.i64(ptr addrspace(1) nocapture writeonly, i8, i64, i1 immarg)
-!0 = distinct !{!0, !"bax"}
+!0 = distinct !{!0, i1 false, !"bax"}
!1 = distinct !{!1, !0, !"bax: %p"}
!2 = !{!1}
!3 = distinct !{!3, !0, !"bax: %q"}
diff --git a/llvm/test/CodeGen/AMDGPU/remove-no-kernel-id-attribute.ll b/llvm/test/CodeGen/AMDGPU/remove-no-kernel-id-attribute.ll
index a7c9a55eafa08..ae4fa6f13fe6b 100644
--- a/llvm/test/CodeGen/AMDGPU/remove-no-kernel-id-attribute.ll
+++ b/llvm/test/CodeGen/AMDGPU/remove-no-kernel-id-attribute.ll
@@ -201,13 +201,13 @@ define amdgpu_kernel void @kernel_lds_recursion() {
; CHECK: [[META3]] = !{i32 1}
; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META6:![0-9]+]]}
-; CHECK: [[META6]] = distinct !{[[META6]]}
+; CHECK: [[META6]] = distinct !{[[META6]], i1 false}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META6]]}
; CHECK: [[META9]] = !{i32 2}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]]}
-; CHECK: [[META12]] = distinct !{[[META12]]}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false}
; CHECK: [[META13]] = !{[[META14:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META12]]}
;.
diff --git a/llvm/test/CodeGen/AMDGPU/si-split-load-store-alias-info.ll b/llvm/test/CodeGen/AMDGPU/si-split-load-store-alias-info.ll
index 81bf7ffb210de..40cddfb0b2dc5 100644
--- a/llvm/test/CodeGen/AMDGPU/si-split-load-store-alias-info.ll
+++ b/llvm/test/CodeGen/AMDGPU/si-split-load-store-alias-info.ll
@@ -27,7 +27,7 @@ define amdgpu_kernel void @test(ptr addrspace(3) noalias %in, ptr addrspace(3) n
declare i32 @llvm.amdgcn.workitem.id.x()
-!0 = !{!"inout.domain"}
+!0 = !{!"inout.domain", i1 false}
!1 = !{!"in.scope", !0}
!2 = !{!"out.scope", !0}
!4 = !{!1}
diff --git a/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll b/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
index dc9c8373f9c17..1aaaf2cd3e7ed 100644
--- a/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
+++ b/llvm/test/CodeGen/AMDGPU/target-mem-intrinsic-metadata.ll
@@ -19,4 +19,4 @@ attributes #0 = { argmemonly convergent nounwind willreturn }
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
diff --git a/llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll b/llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll
index 591a2bd599087..55f0278bbf434 100644
--- a/llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll
+++ b/llvm/test/CodeGen/AMDGPU/waitcnt-unscoped.ll
@@ -63,20 +63,20 @@ entry:
}
; VMEM alias domain and scope
-!5 = !{!"vmem.domain"}
+!5 = !{!"vmem.domain", i1 false}
!4 = !{!"vmem.scope", !5}
!0 = !{!4}
; LDS alias domains and scopes
-!3 = !{!"lds1.domain"}
+!3 = !{!"lds1.domain", i1 false}
!2 = !{!"lds1.scope", !3}
!1 = !{!2}
-!8 = !{!"lds2.domain"}
+!8 = !{!"lds2.domain", i1 false}
!7 = !{!"lds2.scope", !8}
!6 = !{!7}
-!11 = !{!"lds1_off4.domain"}
+!11 = !{!"lds1_off4.domain", i1 false}
!10 = !{!"lds1_off4.scope", !11}
!9 = !{!10}
diff --git a/llvm/test/CodeGen/AVR/rust-avr-bug-95.ll b/llvm/test/CodeGen/AVR/rust-avr-bug-95.ll
index fc28a73a5541c..812a79e6000ad 100644
--- a/llvm/test/CodeGen/AVR/rust-avr-bug-95.ll
+++ b/llvm/test/CodeGen/AVR/rust-avr-bug-95.ll
@@ -26,12 +26,12 @@ attributes #0 = { uwtable }
!0 = !{!1, !3, !5, !6, !8}
!1 = distinct !{!1, !2, !"_ZN3lib3fmt9Formatter9write_str17ha1a9656fc66ccbe5E: %data.0"}
-!2 = distinct !{!2, !"_ZN3lib3fmt9Formatter9write_str17ha1a9656fc66ccbe5E"}
+!2 = distinct !{!2, i1 false, !"_ZN3lib3fmt9Formatter9write_str17ha1a9656fc66ccbe5E"}
!3 = distinct !{!3, !4, !"_ZN3lib3fmt8builders16debug_struct_new17h352a1de8f89c2bc3E: argument 0"}
-!4 = distinct !{!4, !"_ZN3lib3fmt8builders16debug_struct_new17h352a1de8f89c2bc3E"}
+!4 = distinct !{!4, i1 false, !"_ZN3lib3fmt8builders16debug_struct_new17h352a1de8f89c2bc3E"}
!5 = distinct !{!5, !4, !"_ZN3lib3fmt8builders16debug_struct_new17h352a1de8f89c2bc3E: %name.0"}
!6 = distinct !{!6, !7, !"_ZN3lib3fmt9Formatter12debug_struct17ha1ff79f633171b68E: argument 0"}
-!7 = distinct !{!7, !"_ZN3lib3fmt9Formatter12debug_struct17ha1ff79f633171b68E"}
+!7 = distinct !{!7, i1 false, !"_ZN3lib3fmt9Formatter12debug_struct17ha1ff79f633171b68E"}
!8 = distinct !{!8, !7, !"_ZN3lib3fmt9Formatter12debug_struct17ha1ff79f633171b68E: %name.0"}
!9 = !{}
!10 = !{!3, !6}
diff --git a/llvm/test/CodeGen/Hexagon/autohvx/isel-expand-unaligned-loads-noindexed.ll b/llvm/test/CodeGen/Hexagon/autohvx/isel-expand-unaligned-loads-noindexed.ll
index a27e50fb2931c..f01ed6cfbb20b 100644
--- a/llvm/test/CodeGen/Hexagon/autohvx/isel-expand-unaligned-loads-noindexed.ll
+++ b/llvm/test/CodeGen/Hexagon/autohvx/isel-expand-unaligned-loads-noindexed.ll
@@ -57,7 +57,7 @@ attributes #0 = { nounwind "target-cpu"="hexagonv60" "target-features"="+hvx-len
!2 = !{!"Simple C/C++ TBAA"}
!3 = !{!4}
!4 = distinct !{!4, !5}
-!5 = distinct !{!5, !"LVerDomain"}
+!5 = distinct !{!5, i1 false, !"LVerDomain"}
!6 = !{!7}
!7 = distinct !{!7, !5}
!8 = !{!4, !9, !10, !11}
diff --git a/llvm/test/CodeGen/Hexagon/swp-conv3x3-nested.ll b/llvm/test/CodeGen/Hexagon/swp-conv3x3-nested.ll
index 69b89a680ff5a..ed837a54404f1 100644
--- a/llvm/test/CodeGen/Hexagon/swp-conv3x3-nested.ll
+++ b/llvm/test/CodeGen/Hexagon/swp-conv3x3-nested.ll
@@ -162,7 +162,7 @@ attributes #2 = { nounwind }
!4 = !{!"Simple C/C++ TBAA"}
!5 = !{!6}
!6 = distinct !{!6, !7, !"x: %a"}
-!7 = distinct !{!7, !"x"}
+!7 = distinct !{!7, i1 false, !"x"}
!8 = !{!9, !10}
!9 = distinct !{!9, !7, !"x: %b"}
!10 = distinct !{!10, !7, !"x: %c"}
diff --git a/llvm/test/CodeGen/MIR/AArch64/machine-metadata.mir b/llvm/test/CodeGen/MIR/AArch64/machine-metadata.mir
index a0764ae25b492..7708e6db0d360 100644
--- a/llvm/test/CodeGen/MIR/AArch64/machine-metadata.mir
+++ b/llvm/test/CodeGen/MIR/AArch64/machine-metadata.mir
@@ -54,7 +54,7 @@
!0 = !{!1}
!1 = distinct !{!1, !2, !"bax: %p"}
- !2 = distinct !{!2, !"bax"}
+ !2 = distinct !{!2, i1 false, !"bax"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"bax: %q"}
@@ -74,15 +74,17 @@ body: |
liveins: $x0, $x1
; CHECK-LABEL: name: test_memcpy
- ; CHECK: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
- ; CHECK: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
- ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
- ; CHECK: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
- ; CHECK: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
- ; CHECK: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
- ; CHECK: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
- ; CHECK: $w0 = COPY [[ADDWrr]]
- ; CHECK: RET_ReallyLR implicit $w0
+ ; CHECK: liveins: $x0, $x1
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
+ ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
+ ; CHECK-NEXT: $w0 = COPY [[ADDWrr]]
+ ; CHECK-NEXT: RET_ReallyLR implicit $w0
%1:gpr64common = COPY $x1
%0:gpr64common = COPY $x0
%2:fpr128 = LDRQui %0, 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
@@ -109,15 +111,17 @@ body: |
liveins: $x0, $x1
; CHECK-LABEL: name: test_memcpy_inline
- ; CHECK: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
- ; CHECK: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
- ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
- ; CHECK: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
- ; CHECK: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
- ; CHECK: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
- ; CHECK: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
- ; CHECK: $w0 = COPY [[ADDWrr]]
- ; CHECK: RET_ReallyLR implicit $w0
+ ; CHECK: liveins: $x0, $x1
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
+ ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
+ ; CHECK-NEXT: $w0 = COPY [[ADDWrr]]
+ ; CHECK-NEXT: RET_ReallyLR implicit $w0
%1:gpr64common = COPY $x1
%0:gpr64common = COPY $x0
%2:fpr128 = LDRQui %0, 1 :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
@@ -144,15 +148,17 @@ body: |
liveins: $x0, $x1
; CHECK-LABEL: name: test_mempcpy
- ; CHECK: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
- ; CHECK: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
- ; CHECK: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 1, !alias.scope !5, !noalias !8)
- ; CHECK: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 1, !alias.scope !10, !noalias !11)
- ; CHECK: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
- ; CHECK: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
- ; CHECK: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
- ; CHECK: $w0 = COPY [[ADDWrr]]
- ; CHECK: RET_ReallyLR implicit $w0
+ ; CHECK: liveins: $x0, $x1
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gpr64common = COPY $x1
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gpr64common = COPY $x0
+ ; CHECK-NEXT: [[LDRQui:%[0-9]+]]:fpr128 = LDRQui [[COPY1]], 1 :: (load (s128) from %ir.p1, align 1, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: STRQui killed [[LDRQui]], [[COPY1]], 0 :: (store (s128) into %ir.p0, align 1, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[LDRWui:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 0 :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[LDRWui1:%[0-9]+]]:gpr32 = LDRWui [[COPY]], 1 :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADDWrr:%[0-9]+]]:gpr32 = ADDWrr killed [[LDRWui]], killed [[LDRWui1]]
+ ; CHECK-NEXT: $w0 = COPY [[ADDWrr]]
+ ; CHECK-NEXT: RET_ReallyLR implicit $w0
%1:gpr64common = COPY $x1
%0:gpr64common = COPY $x0
%2:fpr128 = LDRQui %0, 1 :: (load (s128) from %ir.p1, align 1, !alias.scope !5, !noalias !8)
diff --git a/llvm/test/CodeGen/MIR/AMDGPU/machine-metadata.mir b/llvm/test/CodeGen/MIR/AMDGPU/machine-metadata.mir
index 45cf5a3fb7f7b..173f8573597f1 100644
--- a/llvm/test/CodeGen/MIR/AMDGPU/machine-metadata.mir
+++ b/llvm/test/CodeGen/MIR/AMDGPU/machine-metadata.mir
@@ -59,7 +59,7 @@
!0 = !{!1}
!1 = distinct !{!1, !2, !"bax: %p"}
- !2 = distinct !{!2, !"bax"}
+ !2 = distinct !{!2, i1 false, !"bax"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"bax: %q"}
@@ -79,23 +79,25 @@ body: |
liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
; CHECK-LABEL: name: test_memcpy
- ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr3
- ; CHECK: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
- ; CHECK: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr1
- ; CHECK: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr0
- ; CHECK: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[COPY1]], %subreg.sub1
- ; CHECK: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY4]], %subreg.sub0, [[COPY3]], %subreg.sub1
- ; CHECK: [[COPY5:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
- ; CHECK: [[GLOBAL_LOAD_DWORDX4_:%[0-9]+]]:vreg_128 = GLOBAL_LOAD_DWORDX4 [[COPY5]], 16, 0, implicit $exec :: (load (s128) from %ir.p1, align 4, !alias.scope ![[LOAD_SCOPE:[0-9]+]], !noalias ![[LOAD_NOALIAS:[0-9]+]], addrspace 1)
- ; CHECK: [[COPY6:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
- ; CHECK: GLOBAL_STORE_DWORDX4 [[COPY6]], killed [[GLOBAL_LOAD_DWORDX4_]], 0, 0, implicit $exec :: (store (s128) into %ir.p0, align 4, !alias.scope ![[STORE_SCOPE:[0-9]+]], !noalias ![[STORE_NOALIAS:[0-9]+]], addrspace 1)
- ; CHECK: [[COPY7:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]]
- ; CHECK: [[GLOBAL_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = GLOBAL_LOAD_DWORDX2 killed [[COPY7]], 0, 0, implicit $exec :: (load (s64) from %ir.1, align 4, !alias.scope ![[IR_SCOPE:[0-9]+]], !noalias ![[IR_NOALIAS:[0-9]+]], addrspace 1)
- ; CHECK: [[COPY8:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub0
- ; CHECK: [[COPY9:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub1
- ; CHECK: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 killed [[COPY8]], killed [[COPY9]], 0, implicit $exec
- ; CHECK: $vgpr0 = COPY [[V_ADD_U32_e64_]]
- ; CHECK: SI_RETURN implicit $vgpr0
+ ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr3
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
+ ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr1
+ ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr0
+ ; CHECK-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[COPY]], %subreg.sub1
+ ; CHECK-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY3]], %subreg.sub0, [[COPY2]], %subreg.sub1
+ ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
+ ; CHECK-NEXT: [[GLOBAL_LOAD_DWORDX4_:%[0-9]+]]:vreg_128 = GLOBAL_LOAD_DWORDX4 [[COPY4]], 16, 0, implicit $exec :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8, addrspace 1)
+ ; CHECK-NEXT: [[COPY5:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
+ ; CHECK-NEXT: GLOBAL_STORE_DWORDX4 [[COPY5]], killed [[GLOBAL_LOAD_DWORDX4_]], 0, 0, implicit $exec :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11, addrspace 1)
+ ; CHECK-NEXT: [[COPY6:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]]
+ ; CHECK-NEXT: [[GLOBAL_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = GLOBAL_LOAD_DWORDX2 killed [[COPY6]], 0, 0, implicit $exec :: (load (s64) from %ir.1, align 4, !alias.scope !3, !noalias !0, addrspace 1)
+ ; CHECK-NEXT: [[COPY7:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub0
+ ; CHECK-NEXT: [[COPY8:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub1
+ ; CHECK-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 killed [[COPY7]], killed [[COPY8]], 0, implicit $exec
+ ; CHECK-NEXT: $vgpr0 = COPY [[V_ADD_U32_e64_]]
+ ; CHECK-NEXT: SI_RETURN implicit $vgpr0
%3:vgpr_32 = COPY $vgpr3
%2:vgpr_32 = COPY $vgpr2
%1:vgpr_32 = COPY $vgpr1
@@ -130,23 +132,25 @@ body: |
liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
; CHECK-LABEL: name: test_memcpy_inline
- ; CHECK: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr3
- ; CHECK: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr2
- ; CHECK: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr1
- ; CHECK: [[COPY4:%[0-9]+]]:vgpr_32 = COPY $vgpr0
- ; CHECK: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY2]], %subreg.sub0, [[COPY1]], %subreg.sub1
- ; CHECK: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY4]], %subreg.sub0, [[COPY3]], %subreg.sub1
- ; CHECK: [[COPY5:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
- ; CHECK: [[GLOBAL_LOAD_DWORDX4_:%[0-9]+]]:vreg_128 = GLOBAL_LOAD_DWORDX4 [[COPY5]], 16, 0, implicit $exec :: (load (s128) from %ir.p1, align 4, !alias.scope ![[INLINE_LOAD_SCOPE:[0-9]+]], !noalias ![[INLINE_LOAD_NOALIAS:[0-9]+]], addrspace 1)
- ; CHECK: [[COPY6:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
- ; CHECK: GLOBAL_STORE_DWORDX4 [[COPY6]], killed [[GLOBAL_LOAD_DWORDX4_]], 0, 0, implicit $exec :: (store (s128) into %ir.p0, align 4, !alias.scope ![[INLINE_STORE_SCOPE:[0-9]+]], !noalias ![[INLINE_STORE_NOALIAS:[0-9]+]], addrspace 1)
- ; CHECK: [[COPY7:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]]
- ; CHECK: [[GLOBAL_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = GLOBAL_LOAD_DWORDX2 killed [[COPY7]], 0, 0, implicit $exec :: (load (s64) from %ir.1, align 4, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]], addrspace 1)
- ; CHECK: [[COPY8:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub0
- ; CHECK: [[COPY9:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub1
- ; CHECK: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 killed [[COPY8]], killed [[COPY9]], 0, implicit $exec
- ; CHECK: $vgpr0 = COPY [[V_ADD_U32_e64_]]
- ; CHECK: SI_RETURN implicit $vgpr0
+ ; CHECK: liveins: $vgpr0, $vgpr1, $vgpr2, $vgpr3
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:vgpr_32 = COPY $vgpr3
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:vgpr_32 = COPY $vgpr2
+ ; CHECK-NEXT: [[COPY2:%[0-9]+]]:vgpr_32 = COPY $vgpr1
+ ; CHECK-NEXT: [[COPY3:%[0-9]+]]:vgpr_32 = COPY $vgpr0
+ ; CHECK-NEXT: [[REG_SEQUENCE:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY1]], %subreg.sub0, [[COPY]], %subreg.sub1
+ ; CHECK-NEXT: [[REG_SEQUENCE1:%[0-9]+]]:vreg_64 = REG_SEQUENCE [[COPY3]], %subreg.sub0, [[COPY2]], %subreg.sub1
+ ; CHECK-NEXT: [[COPY4:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
+ ; CHECK-NEXT: [[GLOBAL_LOAD_DWORDX4_:%[0-9]+]]:vreg_128 = GLOBAL_LOAD_DWORDX4 [[COPY4]], 16, 0, implicit $exec :: (load (s128) from %ir.p1, align 4, !alias.scope !5, !noalias !8, addrspace 1)
+ ; CHECK-NEXT: [[COPY5:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE1]]
+ ; CHECK-NEXT: GLOBAL_STORE_DWORDX4 [[COPY5]], killed [[GLOBAL_LOAD_DWORDX4_]], 0, 0, implicit $exec :: (store (s128) into %ir.p0, align 4, !alias.scope !10, !noalias !11, addrspace 1)
+ ; CHECK-NEXT: [[COPY6:%[0-9]+]]:vreg_64 = COPY [[REG_SEQUENCE]]
+ ; CHECK-NEXT: [[GLOBAL_LOAD_DWORDX2_:%[0-9]+]]:vreg_64 = GLOBAL_LOAD_DWORDX2 killed [[COPY6]], 0, 0, implicit $exec :: (load (s64) from %ir.1, align 4, !alias.scope !3, !noalias !0, addrspace 1)
+ ; CHECK-NEXT: [[COPY7:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub0
+ ; CHECK-NEXT: [[COPY8:%[0-9]+]]:vgpr_32 = COPY [[GLOBAL_LOAD_DWORDX2_]].sub1
+ ; CHECK-NEXT: [[V_ADD_U32_e64_:%[0-9]+]]:vgpr_32 = V_ADD_U32_e64 killed [[COPY7]], killed [[COPY8]], 0, implicit $exec
+ ; CHECK-NEXT: $vgpr0 = COPY [[V_ADD_U32_e64_]]
+ ; CHECK-NEXT: SI_RETURN implicit $vgpr0
%3:vgpr_32 = COPY $vgpr3
%2:vgpr_32 = COPY $vgpr2
%1:vgpr_32 = COPY $vgpr1
diff --git a/llvm/test/CodeGen/MIR/X86/machine-metadata.mir b/llvm/test/CodeGen/MIR/X86/machine-metadata.mir
index cb782c88b40b4..5c4806a039664 100644
--- a/llvm/test/CodeGen/MIR/X86/machine-metadata.mir
+++ b/llvm/test/CodeGen/MIR/X86/machine-metadata.mir
@@ -54,7 +54,7 @@
!0 = !{!1}
!1 = distinct !{!1, !2, !"bax: %p"}
- !2 = distinct !{!2, !"bax"}
+ !2 = distinct !{!2, i1 false, !"bax"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"bax: %q"}
@@ -74,16 +74,18 @@ body: |
liveins: $rdi, $rsi
; CHECK-LABEL: name: test_memcpy
- ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
- ; CHECK: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
- ; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope ![[MEMCPY_LOAD_SCOPE:[0-9]+]], !noalias ![[MEMCPY_LOAD_NOALIAS:[0-9]+]])
- ; CHECK: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 4, !alias.scope ![[MEMCPY_LOAD_SCOPE]], !noalias ![[MEMCPY_LOAD_NOALIAS]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 4, !alias.scope ![[MEMCPY_STORE_SCOPE:[0-9]+]], !noalias ![[MEMCPY_STORE_NOALIAS:[0-9]+]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 4, !alias.scope ![[MEMCPY_STORE_SCOPE]], !noalias ![[MEMCPY_STORE_NOALIAS]])
- ; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope ![[IR_SCOPE:[0-9]+]], !noalias ![[IR_NOALIAS:[0-9]+]])
- ; CHECK: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]])
- ; CHECK: $eax = COPY [[ADD32rm]]
- ; CHECK: RET 0, $eax
+ ; CHECK: liveins: $rdi, $rsi
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
+ ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: $eax = COPY [[ADD32rm]]
+ ; CHECK-NEXT: RET 0, $eax
%1:gr64 = COPY $rsi
%0:gr64 = COPY $rdi
%2:gr64 = MOV64rm %0, 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
@@ -111,16 +113,18 @@ body: |
liveins: $rdi, $rsi
; CHECK-LABEL: name: test_memcpy_inline
- ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
- ; CHECK: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
- ; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope ![[INLINE_LOAD_SCOPE:[0-9]+]], !noalias ![[INLINE_LOAD_NOALIAS:[0-9]+]])
- ; CHECK: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 4, !alias.scope ![[INLINE_LOAD_SCOPE]], !noalias ![[INLINE_LOAD_NOALIAS]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 4, !alias.scope ![[INLINE_STORE_SCOPE:[0-9]+]], !noalias ![[INLINE_STORE_NOALIAS:[0-9]+]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 4, !alias.scope ![[INLINE_STORE_SCOPE]], !noalias ![[INLINE_STORE_NOALIAS]])
- ; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]])
- ; CHECK: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]])
- ; CHECK: $eax = COPY [[ADD32rm]]
- ; CHECK: RET 0, $eax
+ ; CHECK: liveins: $rdi, $rsi
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
+ ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 4, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 4, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: $eax = COPY [[ADD32rm]]
+ ; CHECK-NEXT: RET 0, $eax
%1:gr64 = COPY $rsi
%0:gr64 = COPY $rdi
%2:gr64 = MOV64rm %0, 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 4, !alias.scope !5, !noalias !8)
@@ -148,16 +152,18 @@ body: |
liveins: $rdi, $rsi
; CHECK-LABEL: name: test_mempcpy
- ; CHECK: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
- ; CHECK: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
- ; CHECK: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 1, !alias.scope ![[MEMPCPY_LOAD_SCOPE:[0-9]+]], !noalias ![[MEMPCPY_LOAD_NOALIAS:[0-9]+]])
- ; CHECK: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 1, !alias.scope ![[MEMPCPY_LOAD_SCOPE]], !noalias ![[MEMPCPY_LOAD_NOALIAS]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 1, !alias.scope ![[MEMPCPY_STORE_SCOPE:[0-9]+]], !noalias ![[MEMPCPY_STORE_NOALIAS:[0-9]+]])
- ; CHECK: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 1, !alias.scope ![[MEMPCPY_STORE_SCOPE]], !noalias ![[MEMPCPY_STORE_NOALIAS]])
- ; CHECK: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]])
- ; CHECK: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope ![[IR_SCOPE]], !noalias ![[IR_NOALIAS]])
- ; CHECK: $eax = COPY [[ADD32rm]]
- ; CHECK: RET 0, $eax
+ ; CHECK: liveins: $rdi, $rsi
+ ; CHECK-NEXT: {{ $}}
+ ; CHECK-NEXT: [[COPY:%[0-9]+]]:gr64 = COPY $rsi
+ ; CHECK-NEXT: [[COPY1:%[0-9]+]]:gr64 = COPY $rdi
+ ; CHECK-NEXT: [[MOV64rm:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 1, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: [[MOV64rm1:%[0-9]+]]:gr64 = MOV64rm [[COPY1]], 1, $noreg, 24, $noreg :: (load (s64) from %ir.p1 + 8, align 1, !alias.scope !5, !noalias !8)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 8, $noreg, killed [[MOV64rm1]] :: (store (s64) into %ir.p0 + 8, align 1, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: MOV64mr [[COPY1]], 1, $noreg, 0, $noreg, killed [[MOV64rm]] :: (store (s64) into %ir.p0, align 1, !alias.scope !10, !noalias !11)
+ ; CHECK-NEXT: [[MOV32rm:%[0-9]+]]:gr32 = MOV32rm [[COPY]], 1, $noreg, 0, $noreg :: (load (s32) from %ir.q, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: [[ADD32rm:%[0-9]+]]:gr32 = ADD32rm [[MOV32rm]], [[COPY]], 1, $noreg, 4, $noreg, implicit-def dead $eflags :: (load (s32) from %ir.q1, !alias.scope !3, !noalias !0)
+ ; CHECK-NEXT: $eax = COPY [[ADD32rm]]
+ ; CHECK-NEXT: RET 0, $eax
%1:gr64 = COPY $rsi
%0:gr64 = COPY $rdi
%2:gr64 = MOV64rm %0, 1, $noreg, 16, $noreg :: (load (s64) from %ir.p1, align 1, !alias.scope !5, !noalias !8)
diff --git a/llvm/test/CodeGen/MIR/X86/memory-operands.mir b/llvm/test/CodeGen/MIR/X86/memory-operands.mir
index b738dd9b12b51..838d5119a6b32 100644
--- a/llvm/test/CodeGen/MIR/X86/memory-operands.mir
+++ b/llvm/test/CodeGen/MIR/X86/memory-operands.mir
@@ -159,7 +159,7 @@
!9 = !{!10}
!10 = distinct !{!10, !11, !"some scope"}
- !11 = distinct !{!11, !"some domain"}
+ !11 = distinct !{!11, i1 false, !"some domain"}
define zeroext i1 @range_metadata(ptr %x) {
entry:
diff --git a/llvm/test/CodeGen/PowerPC/non-simple-args-intrin.ll b/llvm/test/CodeGen/PowerPC/non-simple-args-intrin.ll
index 38d183e3b24c9..3de5ac59a5c72 100644
--- a/llvm/test/CodeGen/PowerPC/non-simple-args-intrin.ll
+++ b/llvm/test/CodeGen/PowerPC/non-simple-args-intrin.ll
@@ -52,7 +52,7 @@ attributes #1 = { nounwind readnone speculatable }
!3 = !{!"Simple C/C++ TBAA"}
!4 = !{!5}
!5 = distinct !{!5, !6}
-!6 = distinct !{!6, !"LVerDomain"}
+!6 = distinct !{!6, i1 false, !"LVerDomain"}
!7 = !{!8}
!8 = distinct !{!8, !6}
!9 = !{!10, !11, !5}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-barrier.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-barrier.ll
index fd76475d6a5bc..cb463f63e24d7 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-barrier.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-barrier.ll
@@ -16,4 +16,4 @@ declare dso_local spir_func void @_Z22__spirv_ControlBarrierjjj(i32, i32, i32)
!1 = !{!2}
!2 = distinct !{!2, !3}
-!3 = distinct !{!3}
+!3 = distinct !{!3, i1 false}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-copy-memory.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-copy-memory.ll
index 89bdfbc2bd96d..ddd61bd9e0bbb 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-copy-memory.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-copy-memory.ll
@@ -22,4 +22,4 @@ declare void @llvm.memcpy.p1.p1.i64(ptr addrspace(1), ptr addrspace(1), i64, i1)
!1 = !{!2}
!2 = distinct !{!2, !3, !"copy_aliased: %this"}
-!3 = distinct !{!3, !"copy_aliased"}
+!3 = distinct !{!3, i1 false, !"copy_aliased"}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-domain-order.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-domain-order.ll
index faff3b5dcf5d6..9d4184ee6e3b7 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-domain-order.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-domain-order.ll
@@ -20,6 +20,6 @@ entry:
!0 = !{!1}
!1 = distinct !{!1, !2, !"foo: %a"}
-!2 = distinct !{!2, !"foo"}
+!2 = distinct !{!2, i1 false, !"foo"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"foo: %b"}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-atomic.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-atomic.ll
index 6d721fb49dabc..5ecd9926ccc6a 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-atomic.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-atomic.ll
@@ -41,13 +41,13 @@ declare spir_func void @_Z19__spirv_AtomicStorePU3AS4iiii(ptr addrspace(4), i32,
!1 = !{!2}
!2 = distinct !{!2, !3}
-!3 = distinct !{!3}
+!3 = distinct !{!3, i1 false}
!4 = !{!5}
!5 = distinct !{!5, !6}
-!6 = distinct !{!6}
+!6 = distinct !{!6, i1 false}
!7 = !{!8}
!8 = distinct !{!8, !9}
-!9 = distinct !{!9}
+!9 = distinct !{!9, i1 false}
!10 = !{!11}
!11 = distinct !{!11, !12}
-!12 = distinct !{!12}
+!12 = distinct !{!12, i1 false}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-struct.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-struct.ll
index 73975649dbd96..c84bbe4cbc039 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-struct.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store-struct.ll
@@ -23,4 +23,4 @@ entry:
!1 = !{!2}
!2 = distinct !{!2, !3, !"foo: %this"}
-!3 = distinct !{!3, !"foo"}
+!3 = distinct !{!3, i1 false, !"foo"}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store.ll
index 0f00f812f9f2d..944c19e79fae9 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-load-store.ll
@@ -57,10 +57,10 @@ entry:
!1 = !{!2}
!2 = distinct !{!2, !3, !"foo: %this"}
-!3 = distinct !{!3, !"foo"}
+!3 = distinct !{!3, i1 false, !"foo"}
!4 = !{!5}
!5 = distinct !{!5, !6, !"boo: %this"}
-!6 = distinct !{!6, !"boo"}
+!6 = distinct !{!6, i1 false, !"boo"}
!7 = !{!8}
!8 = distinct !{!8, !9, !"foo: %this"}
-!9 = distinct !{!9, !"foo"}
+!9 = distinct !{!9, i1 false, !"foo"}
diff --git a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-masked-load-store.ll b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-masked-load-store.ll
index bb7c90eae3ecd..dd9e1e92b75b1 100644
--- a/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-masked-load-store.ll
+++ b/llvm/test/CodeGen/SPIRV/extensions/SPV_INTEL_memory_access_aliasing/alias-masked-load-store.ll
@@ -75,10 +75,10 @@ entry:
!1 = !{!2}
!2 = distinct !{!2, !3, !"foo: %this"}
-!3 = distinct !{!3, !"foo"}
+!3 = distinct !{!3, i1 false, !"foo"}
!4 = !{!5}
!5 = distinct !{!5, !6, !"boo: %this"}
-!6 = distinct !{!6, !"boo"}
+!6 = distinct !{!6, i1 false, !"boo"}
!7 = !{!8}
!8 = distinct !{!8, !9, !"foo: %this"}
-!9 = distinct !{!9, !"foo"}
+!9 = distinct !{!9, i1 false, !"foo"}
diff --git a/llvm/test/CodeGen/SPIRV/llvm-intrinsics/noalias-scope-decl.ll b/llvm/test/CodeGen/SPIRV/llvm-intrinsics/noalias-scope-decl.ll
index 825b7b1467a13..2d6e99c02f7d2 100644
--- a/llvm/test/CodeGen/SPIRV/llvm-intrinsics/noalias-scope-decl.ll
+++ b/llvm/test/CodeGen/SPIRV/llvm-intrinsics/noalias-scope-decl.ll
@@ -19,4 +19,4 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{!1}
!1 = distinct !{!1, !2, !"foo: %a"}
-!2 = distinct !{!2, !"foo"}
+!2 = distinct !{!2, i1 false, !"foo"}
diff --git a/llvm/test/CodeGen/SystemZ/subregliveness-01.ll b/llvm/test/CodeGen/SystemZ/subregliveness-01.ll
index 76785b22b1bf4..8afddc3421301 100644
--- a/llvm/test/CodeGen/SystemZ/subregliveness-01.ll
+++ b/llvm/test/CodeGen/SystemZ/subregliveness-01.ll
@@ -40,7 +40,7 @@ attributes #0 = { nounwind "correctly-rounded-divide-sqrt-fp-math"="false" "disa
!0 = !{!"clang version 8.0.0"}
!1 = !{!2}
!2 = distinct !{!2, !3, !"func_1: %agg.result"}
-!3 = distinct !{!3, !"func_1"}
+!3 = distinct !{!3, i1 false, !"func_1"}
!4 = !{!5, !5, i64 0}
!5 = !{!"long", !6, i64 0}
!6 = !{!"omnipotent char", !7, i64 0}
diff --git a/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll b/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
index f229ab1a6e34f..16e2c2812fc39 100644
--- a/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
+++ b/llvm/test/CodeGen/X86/dbg-distringtype-uint.ll
@@ -107,7 +107,7 @@ attributes #3 = { nofree nosync nounwind readnone speculatable willreturn }
!41 = !DILocation(line: 19, column: 5, scope: !2, inlinedAt: !39)
!42 = !{!43}
!43 = distinct !{!43, !44, !"semiempirical_corrections_mp_esym_: %semiempirical_corrections_mp_esym_$ESYM"}
-!44 = distinct !{!44, !"semiempirical_corrections_mp_esym_"}
+!44 = distinct !{!44, i1 false, !"semiempirical_corrections_mp_esym_"}
!45 = !{!46}
!46 = distinct !{!46, !44, !"semiempirical_corrections_mp_esym_: %I"}
!48 = !DILocation(line: 12, column: 1, scope: !22)
diff --git a/llvm/test/CodeGen/X86/memcpy-scoped-aa.ll b/llvm/test/CodeGen/X86/memcpy-scoped-aa.ll
index d3b86786a630c..6116e6c6e9f0c 100644
--- a/llvm/test/CodeGen/X86/memcpy-scoped-aa.ll
+++ b/llvm/test/CodeGen/X86/memcpy-scoped-aa.ll
@@ -5,7 +5,7 @@
; Re-evaluate the slot numbers of scopes as that numbering could be changed run-by-run.
-; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"bax"}
+; MIR-DAG: ![[DOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"bax"}
; MIR-DAG: ![[SCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %p"}
; MIR-DAG: ![[SCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[DOMAIN]], !"bax: %q"}
; MIR-DAG: ![[SET0:[0-9]+]] = !{![[SCOPE0]]}
@@ -145,7 +145,7 @@ declare void @llvm.memset.p0.i64(ptr nocapture writeonly, i8, i64, i1 immarg)
declare ptr @mempcpy(ptr, ptr, i64)
-!0 = distinct !{!0, !"bax"}
+!0 = distinct !{!0, i1 false, !"bax"}
!1 = distinct !{!1, !0, !"bax: %p"}
!2 = !{!1}
!3 = distinct !{!3, !0, !"bax: %q"}
diff --git a/llvm/test/CodeGen/X86/pr48727.ll b/llvm/test/CodeGen/X86/pr48727.ll
index 50b38a8b0a6fc..57fb008c3c416 100644
--- a/llvm/test/CodeGen/X86/pr48727.ll
+++ b/llvm/test/CodeGen/X86/pr48727.ll
@@ -42,4 +42,4 @@ entry:
!0 = !{}
!1 = !{!2}
!2 = !{!"buffer: {index:1, offset:0, size:20000}", !3}
-!3 = !{!"XLA global AA domain"}
+!3 = !{!"XLA global AA domain", i1 false}
diff --git a/llvm/test/DebugInfo/COFF/fortran-contained-proc.ll b/llvm/test/DebugInfo/COFF/fortran-contained-proc.ll
index a9371cd7b0886..075046138dfdc 100644
--- a/llvm/test/DebugInfo/COFF/fortran-contained-proc.ll
+++ b/llvm/test/DebugInfo/COFF/fortran-contained-proc.ll
@@ -119,7 +119,7 @@ attributes #4 = { nounwind }
!40 = !{!"ifx$root$2$IF_TEST_ip_SUB"}
!41 = !{!42}
!42 = distinct !{!42, !43, !"IF_TEST_ip_SUB: %AA"}
-!43 = distinct !{!43, !"IF_TEST_ip_SUB"}
+!43 = distinct !{!43, i1 false, !"IF_TEST_ip_SUB"}
!44 = !DILocation(line: 16, scope: !2)
!45 = !DILocation(line: 17, scope: !30)
!46 = !DILocation(line: 0, scope: !30)
diff --git a/llvm/test/DebugInfo/Generic/sroa-samesize.ll b/llvm/test/DebugInfo/Generic/sroa-samesize.ll
index 911f90c8e06c9..233aa31b43cb4 100644
--- a/llvm/test/DebugInfo/Generic/sroa-samesize.ll
+++ b/llvm/test/DebugInfo/Generic/sroa-samesize.ll
@@ -97,7 +97,7 @@ attributes #0 = { nounwind readnone speculatable }
!46 = !DILocation(line: 8, column: 8, scope: !12, inlinedAt: !25)
!47 = !{!48}
!48 = distinct !{!48, !49, !"\01?x5@@YA?AUx2@@XZ: %agg.result"}
-!49 = distinct !{!49, !"\01?x5@@YA?AUx2@@XZ"}
+!49 = distinct !{!49, i1 false, !"\01?x5@@YA?AUx2@@XZ"}
!50 = !DILocation(line: 3, column: 13, scope: !51, inlinedAt: !56)
!51 = distinct !DISubprogram(name: "x2", linkageName: "\01??0x2@@QEAA at H@Z", scope: !15, file: !1, line: 3, type: !20, isLocal: false, isDefinition: true, scopeLine: 3, flags: DIFlagPrototyped, isOptimized: true, unit: !0, declaration: !19, retainedNodes: !52)
!52 = !{!53, !54}
diff --git a/llvm/test/DebugInfo/X86/global-sra-struct-part-overlap-segment.ll b/llvm/test/DebugInfo/X86/global-sra-struct-part-overlap-segment.ll
index 3dd4d9c6cca7f..a63fbee0a6e6d 100644
--- a/llvm/test/DebugInfo/X86/global-sra-struct-part-overlap-segment.ll
+++ b/llvm/test/DebugInfo/X86/global-sra-struct-part-overlap-segment.ll
@@ -190,7 +190,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!22 = distinct !DISubprogram(name: "foo", scope: !2, file: !4, line: 5, type: !10, scopeLine: 5, flags: DIFlagAllCallsDescribed, spFlags: DISPFlagDefinition | DISPFlagOptimized, unit: !3)
!23 = !{!24}
!24 = distinct !{!24, !25, !"mymod_bar_: %bar"}
-!25 = distinct !{!25, !"mymod_bar_"}
+!25 = distinct !{!25, i1 false, !"mymod_bar_"}
!26 = !{!27}
!27 = distinct !{!27, !25, !"mymod_bar_: %arg"}
!28 = !{!24, !27}
diff --git a/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll b/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll
index 0a00083c340b9..925848ed4c5e6 100644
--- a/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll
+++ b/llvm/test/Transforms/AggressiveInstCombine/AArch64/or-load.ll
@@ -1325,7 +1325,7 @@ define i32 @loadCombine_4consecutive_metadata(ptr %p, ptr %pstr) {
ret i32 %o3
}
-!0 = distinct !{!0}
+!0 = distinct !{!0, i1 false}
!1 = distinct !{!1, !0}
!2 = !{!1}
diff --git a/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll b/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll
index d8ab24c7b7eb1..5ee9c8328d4c9 100644
--- a/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll
+++ b/llvm/test/Transforms/AggressiveInstCombine/X86/or-load.ll
@@ -1426,7 +1426,7 @@ define i32 @loadCombine_4consecutive_metadata(ptr %p, ptr %pstr) {
ret i32 %o3
}
-!0 = distinct !{!0}
+!0 = distinct !{!0, i1 false}
!1 = distinct !{!1, !0}
!2 = !{!1}
diff --git a/llvm/test/Transforms/AggressiveInstCombine/X86/store-merge.ll b/llvm/test/Transforms/AggressiveInstCombine/X86/store-merge.ll
index ef7e44fcf775b..04bfcf191b79d 100644
--- a/llvm/test/Transforms/AggressiveInstCombine/X86/store-merge.ll
+++ b/llvm/test/Transforms/AggressiveInstCombine/X86/store-merge.ll
@@ -900,11 +900,11 @@ define void @test_zext_store(i56 %arg, ptr %p) {
!0 = !{!1}
!1 = !{!1, !2}
-!2 = !{!2}
+!2 = !{!2, i1 false}
!3 = !{!4}
!4 = !{!4, !5}
-!5 = !{!5}
+!5 = !{!5, i1 false}
!6 = !{!7, !7, i64 0}
!7 = !{!"short", !8, i64 0}
@@ -913,6 +913,6 @@ define void @test_zext_store(i56 %arg, ptr %p) {
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]]}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false}
; CHECK: [[META3]] = !{}
;.
diff --git a/llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll b/llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
index e77d2294b0cbf..210dffe46b929 100644
--- a/llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
+++ b/llvm/test/Transforms/AtomicExpand/AMDGPU/expand-atomic-i16.ll
@@ -2073,7 +2073,7 @@ define i16 @test_atomicrmw_usub_sat_i16_flat_agent_align4(ptr %ptr, i16 %value)
!1 = !{!"foo", !"bar"}
!2 = !{!3}
!3 = distinct !{!3, !4}
-!4 = distinct !{!4}
+!4 = distinct !{!4, i1 false}
!5 = !{i64 0, i64 4, !6, i64 4, i64 4, !6}
!6 = !{!7, !7, i64 0}
!7 = !{!"omnipotent char", !8, i64 0}
diff --git a/llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll b/llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll
index f8801378b2305..58fc3a5542fa2 100644
--- a/llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll
+++ b/llvm/test/Transforms/DFAJumpThreading/dfa-jump-threading-transform.ll
@@ -732,7 +732,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!1 = !{!"branch_weights", i32 3, i32 5}
!2 = !{!3}
!3 = distinct !{!3, !4, !"scope1"}
-!4 = distinct !{!4, !"domain"}
+!4 = distinct !{!4, i1 false, !"domain"}
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
;.
@@ -740,7 +740,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
; CHECK: [[PROF1]] = !{!"branch_weights", i32 3, i32 5}
; CHECK: [[META2]] = !{[[META3:![0-9]+]]}
; CHECK: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]], !"scope1"}
-; CHECK: [[META4]] = distinct !{[[META4]], !"domain"}
+; CHECK: [[META4]] = distinct !{[[META4]], i1 false, !"domain"}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META4]], !"scope1:dfa"}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
diff --git a/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll b/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll
index f38c7d7b4aacc..0f908153e0733 100644
--- a/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/merge-stores.ll
@@ -250,6 +250,6 @@ define void @killing_store_atomic_unordered(ptr %p) {
!29 = !{i32 1}
; Domains and scopes which might alias
-!30 = !{!30}
+!30 = !{!30, i1 false}
!31 = !{!31, !30}
!32 = !{!31}
diff --git a/llvm/test/Transforms/DeadStoreElimination/scoped-noalias.ll b/llvm/test/Transforms/DeadStoreElimination/scoped-noalias.ll
index a9ca0f9ec8c0b..fdda2388f9821 100644
--- a/llvm/test/Transforms/DeadStoreElimination/scoped-noalias.ll
+++ b/llvm/test/Transforms/DeadStoreElimination/scoped-noalias.ll
@@ -29,6 +29,6 @@ else:
ret void
}
-!0 = !{!0}
+!0 = !{!0, i1 false}
!1 = !{!1, !0}
!2 = !{!1}
diff --git a/llvm/test/Transforms/EarlyCSE/noalias-scope-decl.ll b/llvm/test/Transforms/EarlyCSE/noalias-scope-decl.ll
index 6b20bd6662f86..8e27a1ac0e225 100644
--- a/llvm/test/Transforms/EarlyCSE/noalias-scope-decl.ll
+++ b/llvm/test/Transforms/EarlyCSE/noalias-scope-decl.ll
@@ -35,4 +35,4 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{ !1 }
!1 = distinct !{ !1, !2 }
-!2 = distinct !{ !2 }
+!2 = distinct !{!2, i1 false}
diff --git a/llvm/test/Transforms/GVN/noalias.ll b/llvm/test/Transforms/GVN/noalias.ll
index f28023d270946..5e84f8119e6c2 100644
--- a/llvm/test/Transforms/GVN/noalias.ll
+++ b/llvm/test/Transforms/GVN/noalias.ll
@@ -44,7 +44,7 @@ declare i32 @foo(ptr) readonly
!0 = distinct !{!0, !2, !"callee0: %a"}
!1 = distinct !{!1, !2, !"callee0: %b"}
-!2 = distinct !{!2, !"callee0"}
+!2 = distinct !{!2, i1 false, !"callee0"}
!3 = !{!0}
!4 = !{!1}
@@ -52,7 +52,7 @@ declare i32 @foo(ptr) readonly
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"callee0: %a"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"callee0"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"callee0"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]], !"callee0: %b"}
;.
diff --git a/llvm/test/Transforms/GVN/rle-coerced-noalias.ll b/llvm/test/Transforms/GVN/rle-coerced-noalias.ll
index 67f7f58543aa8..1ae70ee2fa8d3 100644
--- a/llvm/test/Transforms/GVN/rle-coerced-noalias.ll
+++ b/llvm/test/Transforms/GVN/rle-coerced-noalias.ll
@@ -89,11 +89,11 @@ f:
; Alias-scope metadata domain.
!1 = distinct !{!1, !2, !"scope A"}
-!2 = distinct !{!2, !"test domain"}
+!2 = distinct !{!2, i1 false, !"test domain"}
!0 = !{!1}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"scope A"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"test domain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"test domain"}
;.
diff --git a/llvm/test/Transforms/IndVarSimplify/addrec_no_exec_on_every_iteration.ll b/llvm/test/Transforms/IndVarSimplify/addrec_no_exec_on_every_iteration.ll
index d8bf1567d00ed..958cdc51ac305 100644
--- a/llvm/test/Transforms/IndVarSimplify/addrec_no_exec_on_every_iteration.ll
+++ b/llvm/test/Transforms/IndVarSimplify/addrec_no_exec_on_every_iteration.ll
@@ -342,7 +342,7 @@ attributes #0 = { nofree norecurse nounwind uwtable denormal_fpenv(preservesign)
!3 = !{i64 1536}
!4 = !{!5}
!5 = !{!"buffer: {index:3, offset:0, size:800}", !6}
-!6 = !{!"XLA global AA domain"}
+!6 = !{!"XLA global AA domain", i1 false}
!7 = !{!8, !9}
!8 = !{!"buffer: {index:3, offset:800, size:672}", !6}
!9 = !{!"buffer: {index:3, offset:1472, size:64}", !6}
diff --git a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/debug-info.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/debug-info.ll
index c85c3a4ada3bf..9b05303b3dfcb 100644
--- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/debug-info.ll
+++ b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/debug-info.ll
@@ -123,7 +123,7 @@ attributes #4 = { nounwind readnone speculatable }
!25 = !{!"tbaa root"}
!26 = !{!27}
!27 = distinct !{!27, !28, !"some scope 1"}
-!28 = distinct !{!28, !"some domain"}
+!28 = distinct !{!28, i1 false, !"some domain"}
!29 = !{!30}
!30 = distinct !{!30, !28, !"some scope 2"}
!31 = !DILocation(line: 13, column: 1, scope: !20)
diff --git a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll
index 4b055f102c8a5..2e432a7f71e85 100644
--- a/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll
+++ b/llvm/test/Transforms/InferAddressSpaces/AMDGPU/mem-intrinsics.ll
@@ -231,7 +231,7 @@ attributes #1 = { argmemonly nounwind }
!2 = !{!"tbaa root"}
!3 = !{!4}
!4 = distinct !{!4, !5, !"some scope 1"}
-!5 = distinct !{!5, !"some domain"}
+!5 = distinct !{!5, i1 false, !"some domain"}
!6 = !{!7}
!7 = distinct !{!7, !5, !"some scope 2"}
!8 = !{i64 0, i64 8, null}
@@ -241,7 +241,7 @@ attributes #1 = { argmemonly nounwind }
; CHECK: [[META2]] = !{!"tbaa root"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]], !"some scope 1"}
-; CHECK: [[META5]] = distinct !{[[META5]], !"some domain"}
+; CHECK: [[META5]] = distinct !{[[META5]], i1 false, !"some domain"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META5]], !"some scope 2"}
; CHECK: [[TBAA_STRUCT8]] = !{i64 0, i64 8, null}
diff --git a/llvm/test/Transforms/Inline/AMDGPU/load-intrinsics.ll b/llvm/test/Transforms/Inline/AMDGPU/load-intrinsics.ll
index b67579b82bb22..3d71e359a4140 100644
--- a/llvm/test/Transforms/Inline/AMDGPU/load-intrinsics.ll
+++ b/llvm/test/Transforms/Inline/AMDGPU/load-intrinsics.ll
@@ -35,16 +35,15 @@ entry:
store <2 x i32> %val, ptr addrspace(1) %use
ret void
}
-;.
; Check Function Attribute on decl
-; OPT: declare <2 x i32> @llvm.amdgcn.ds.read.tr4.b64.v2i32(ptr addrspace(3) captures(none)) #[[ATTR0:[0-9]+]]
declare <2 x i32> @llvm.amdgcn.ds.read.tr4.b64.v2i32(ptr addrspace(3))
-; OPT: attributes #[[ATTR0]] = { convergent nocallback nofree nounwind willreturn memory(argmem: read) }
+;.
+; OPT: attributes #[[ATTR0:[0-9]+]] = { convergent nocallback nofree nounwind willreturn memory(argmem: read) }
; OPT: attributes #[[ATTR1:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
;.
; OPT: [[META0]] = !{[[META1:![0-9]+]]}
; OPT: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"callee: %addr"}
-; OPT: [[META2]] = distinct !{[[META2]], !"callee"}
+; OPT: [[META2]] = distinct !{[[META2]], i1 false, !"callee"}
; OPT: [[META3]] = !{[[META4:![0-9]+]]}
; OPT: [[META4]] = distinct !{[[META4]], [[META2]], !"callee: %use"}
;.
diff --git a/llvm/test/Transforms/Inline/noalias-calls-always.ll b/llvm/test/Transforms/Inline/noalias-calls-always.ll
index 18a65b9876412..3634463a8c0e5 100644
--- a/llvm/test/Transforms/Inline/noalias-calls-always.ll
+++ b/llvm/test/Transforms/Inline/noalias-calls-always.ll
@@ -94,14 +94,14 @@ attributes #2 = { nounwind uwtable }
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"hello: %a"}
-; CHECK: !2 = distinct !{!2, !"hello"}
+; CHECK: !2 = distinct !{!2, i1 false, !"hello"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"hello: %c"}
; CHECK: !5 = !{!1, !4}
; CHECK: !6 = !{!7}
; CHECK: !7 = distinct !{!7, !8, !"hello_cs: %a"}
-; CHECK: !8 = distinct !{!8, !"hello_cs"}
+; CHECK: !8 = distinct !{!8, i1 false, !"hello_cs"}
; CHECK: !9 = !{!10}
; CHECK: !10 = distinct !{!10, !8, !"hello_cs: %c"}
; CHECK: !11 = !{!7, !10}
diff --git a/llvm/test/Transforms/Inline/noalias-calls.ll b/llvm/test/Transforms/Inline/noalias-calls.ll
index 4673daefa4db2..633b5046d3d25 100644
--- a/llvm/test/Transforms/Inline/noalias-calls.ll
+++ b/llvm/test/Transforms/Inline/noalias-calls.ll
@@ -100,14 +100,14 @@ attributes #3 = { nounwind uwtable }
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"hello: %a"}
-; CHECK: !2 = distinct !{!2, !"hello"}
+; CHECK: !2 = distinct !{!2, i1 false, !"hello"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"hello: %c"}
; CHECK: !5 = !{!1, !4}
; CHECK: !6 = !{!7}
; CHECK: !7 = distinct !{!7, !8, !"hello_cs: %a"}
-; CHECK: !8 = distinct !{!8, !"hello_cs"}
+; CHECK: !8 = distinct !{!8, i1 false, !"hello_cs"}
; CHECK: !9 = !{!10}
; CHECK: !10 = distinct !{!10, !8, !"hello_cs: %c"}
; CHECK: !11 = !{!7, !10}
diff --git a/llvm/test/Transforms/Inline/noalias-calls2.ll b/llvm/test/Transforms/Inline/noalias-calls2.ll
index bbfc03bf2bef7..18b9ebe1c77be 100644
--- a/llvm/test/Transforms/Inline/noalias-calls2.ll
+++ b/llvm/test/Transforms/Inline/noalias-calls2.ll
@@ -13,10 +13,10 @@ define void @caller_equals_callee(ptr noalias %p0, ptr noalias %p1, i32 %cnt) {
; CHECK-NEXT: entry:
; CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[P0]], i64 2
; CHECK-NEXT: [[ADD_PTR1:%.*]] = getelementptr inbounds i32, ptr [[P1]], i64 2
-; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata !0)
-; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata !3)
-; CHECK-NEXT: store i32 10, ptr [[ADD_PTR]], align 4, !alias.scope !0, !noalias !3
-; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1]], align 4, !alias.scope !3, !noalias !0
+; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
+; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
+; CHECK-NEXT: store i32 10, ptr [[ADD_PTR]], align 4, !alias.scope [[META0]], !noalias [[META3]]
+; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1]], align 4, !alias.scope [[META3]], !noalias [[META0]]
; CHECK-NEXT: [[CMP:%.*]] = icmp eq i32 [[CNT]], 0
; CHECK-NEXT: br i1 [[CMP]], label [[IF_THEN:%.*]], label [[IF_ELSE:%.*]]
; CHECK: if.then:
@@ -25,15 +25,15 @@ define void @caller_equals_callee(ptr noalias %p0, ptr noalias %p1, i32 %cnt) {
; CHECK: if.else:
; CHECK-NEXT: [[ADD_PTR2:%.*]] = getelementptr inbounds i32, ptr [[P1]], i64 1
; CHECK-NEXT: [[ADD_PTR3:%.*]] = getelementptr inbounds i32, ptr [[P0]], i64 1
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !5)
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !8)
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META8:![0-9]+]])
; CHECK-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR2]], i64 2
; CHECK-NEXT: [[ADD_PTR1_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR3]], i64 2
-; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata !10)
-; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata !13)
-; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I]], align 4, !alias.scope !15, !noalias !16
-; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I]], align 4, !alias.scope !16, !noalias !15
-; CHECK-NEXT: store i32 11, ptr [[ADD_PTR2]], align 4, !alias.scope !5, !noalias !8
+; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META10:![0-9]+]])
+; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata [[META13:![0-9]+]])
+; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I]], align 4, !alias.scope [[META15:![0-9]+]], !noalias [[META16:![0-9]+]]
+; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I]], align 4, !alias.scope [[META16]], !noalias [[META15]]
+; CHECK-NEXT: store i32 11, ptr [[ADD_PTR2]], align 4, !alias.scope [[META5]], !noalias [[META8]]
; CHECK-NEXT: store i32 12, ptr [[P1]], align 4
; CHECK-NEXT: br label [[IF_END]]
; CHECK: if.end:
@@ -71,32 +71,32 @@ define void @test01(ptr noalias %p0, ptr noalias %p1, i32 %cnt) {
; CHECK-NEXT: store i32 13, ptr [[P0]], align 4
; CHECK-NEXT: [[ADD_PTR:%.*]] = getelementptr inbounds i32, ptr [[P0]], i64 1
; CHECK-NEXT: [[ADD_PTR1:%.*]] = getelementptr inbounds i32, ptr [[P1]], i64 1
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !17)
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !20)
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META20:![0-9]+]])
; CHECK-NEXT: [[ADD_PTR_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR]], i64 2
; CHECK-NEXT: [[ADD_PTR1_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR1]], i64 2
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !22)
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !25)
-; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I]], align 4, !alias.scope !27, !noalias !28
-; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I]], align 4, !alias.scope !28, !noalias !27
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META22:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META25:![0-9]+]])
+; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I]], align 4, !alias.scope [[META27:![0-9]+]], !noalias [[META28:![0-9]+]]
+; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I]], align 4, !alias.scope [[META28]], !noalias [[META27]]
; CHECK-NEXT: [[CMP_I:%.*]] = icmp eq i32 [[CNT]], 0
; CHECK-NEXT: br i1 [[CMP_I]], label [[IF_THEN_I:%.*]], label [[IF_ELSE_I:%.*]]
; CHECK: if.then.i:
-; CHECK-NEXT: store i32 11, ptr [[ADD_PTR]], align 4, !alias.scope !17, !noalias !20
+; CHECK-NEXT: store i32 11, ptr [[ADD_PTR]], align 4, !alias.scope [[META17]], !noalias [[META20]]
; CHECK-NEXT: br label [[CALLER_EQUALS_CALLEE_EXIT:%.*]]
; CHECK: if.else.i:
; CHECK-NEXT: [[ADD_PTR2_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR1]], i64 1
; CHECK-NEXT: [[ADD_PTR3_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR]], i64 1
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !29)
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !32)
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META29:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META32:![0-9]+]])
; CHECK-NEXT: [[ADD_PTR_I_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR2_I]], i64 2
; CHECK-NEXT: [[ADD_PTR1_I_I:%.*]] = getelementptr inbounds i32, ptr [[ADD_PTR3_I]], i64 2
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !34)
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !37)
-; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I_I]], align 4, !alias.scope !39, !noalias !40
-; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I_I]], align 4, !alias.scope !40, !noalias !39
-; CHECK-NEXT: store i32 11, ptr [[ADD_PTR2_I]], align 4, !alias.scope !41, !noalias !42
-; CHECK-NEXT: store i32 12, ptr [[ADD_PTR1]], align 4, !alias.scope !20, !noalias !17
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META34:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META37:![0-9]+]])
+; CHECK-NEXT: store i32 10, ptr [[ADD_PTR_I_I]], align 4, !alias.scope [[META39:![0-9]+]], !noalias [[META40:![0-9]+]]
+; CHECK-NEXT: store i32 20, ptr [[ADD_PTR1_I_I]], align 4, !alias.scope [[META40]], !noalias [[META39]]
+; CHECK-NEXT: store i32 11, ptr [[ADD_PTR2_I]], align 4, !alias.scope [[META41:![0-9]+]], !noalias [[META42:![0-9]+]]
+; CHECK-NEXT: store i32 12, ptr [[ADD_PTR1]], align 4, !alias.scope [[META20]], !noalias [[META17]]
; CHECK-NEXT: br label [[CALLER_EQUALS_CALLEE_EXIT]]
; CHECK: caller_equals_callee.exit:
; CHECK-NEXT: ret void
@@ -113,47 +113,47 @@ attributes #0 = { inaccessiblememonly nofree nosync nounwind willreturn }
!0 = !{!1}
!1 = distinct !{!1, !2, !"do_store: %p0"}
-!2 = distinct !{!2, !"do_store"}
+!2 = distinct !{!2, i1 false, !"do_store"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"do_store: %p1"}
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"do_store: %p0"}
-; CHECK: !2 = distinct !{!2, !"do_store"}
+; CHECK: !2 = distinct !{!2, i1 false, !"do_store"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"do_store: %p1"}
; CHECK: !5 = !{!6}
; CHECK: !6 = distinct !{!6, !7, !"caller_equals_callee: %p0"}
-; CHECK: !7 = distinct !{!7, !"caller_equals_callee"}
+; CHECK: !7 = distinct !{!7, i1 false, !"caller_equals_callee"}
; CHECK: !8 = !{!9}
; CHECK: !9 = distinct !{!9, !7, !"caller_equals_callee: %p1"}
; CHECK: !10 = !{!11}
; CHECK: !11 = distinct !{!11, !12, !"do_store: %p0"}
-; CHECK: !12 = distinct !{!12, !"do_store"}
+; CHECK: !12 = distinct !{!12, i1 false, !"do_store"}
; CHECK: !13 = !{!14}
; CHECK: !14 = distinct !{!14, !12, !"do_store: %p1"}
; CHECK: !15 = !{!11, !6}
; CHECK: !16 = !{!14, !9}
; CHECK: !17 = !{!18}
; CHECK: !18 = distinct !{!18, !19, !"caller_equals_callee: %p0"}
-; CHECK: !19 = distinct !{!19, !"caller_equals_callee"}
+; CHECK: !19 = distinct !{!19, i1 false, !"caller_equals_callee"}
; CHECK: !20 = !{!21}
; CHECK: !21 = distinct !{!21, !19, !"caller_equals_callee: %p1"}
; CHECK: !22 = !{!23}
; CHECK: !23 = distinct !{!23, !24, !"do_store: %p0"}
-; CHECK: !24 = distinct !{!24, !"do_store"}
+; CHECK: !24 = distinct !{!24, i1 false, !"do_store"}
; CHECK: !25 = !{!26}
; CHECK: !26 = distinct !{!26, !24, !"do_store: %p1"}
; CHECK: !27 = !{!23, !18}
; CHECK: !28 = !{!26, !21}
; CHECK: !29 = !{!30}
; CHECK: !30 = distinct !{!30, !31, !"caller_equals_callee: %p0"}
-; CHECK: !31 = distinct !{!31, !"caller_equals_callee"}
+; CHECK: !31 = distinct !{!31, i1 false, !"caller_equals_callee"}
; CHECK: !32 = !{!33}
; CHECK: !33 = distinct !{!33, !31, !"caller_equals_callee: %p1"}
; CHECK: !34 = !{!35}
; CHECK: !35 = distinct !{!35, !36, !"do_store: %p0"}
-; CHECK: !36 = distinct !{!36, !"do_store"}
+; CHECK: !36 = distinct !{!36, i1 false, !"do_store"}
; CHECK: !37 = !{!38}
; CHECK: !38 = distinct !{!38, !36, !"do_store: %p1"}
; CHECK: !39 = !{!35, !30, !21}
diff --git a/llvm/test/Transforms/Inline/noalias-cs.ll b/llvm/test/Transforms/Inline/noalias-cs.ll
index 948ed8f76ed39..ddb22e1dfdb80 100644
--- a/llvm/test/Transforms/Inline/noalias-cs.ll
+++ b/llvm/test/Transforms/Inline/noalias-cs.ll
@@ -9,11 +9,11 @@ define void @callee_with_metadata(ptr nocapture %a, ptr nocapture %b, ptr nocapt
; CHECK-NEXT: entry:
; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
-; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[C:%.*]], align 4, !noalias !5
+; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[C:%.*]], align 4, !noalias [[META5:![0-9]+]]
; CHECK-NEXT: [[ARRAYIDX_I:%.*]] = getelementptr inbounds float, ptr [[A:%.*]], i64 5
-; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX_I]], align 4, !alias.scope !0, !noalias !3
+; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX_I]], align 4, !alias.scope [[META0]], !noalias [[META3]]
; CHECK-NEXT: [[ARRAYIDX1_I:%.*]] = getelementptr inbounds float, ptr [[B:%.*]], i64 8
-; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX1_I]], align 4, !alias.scope !3, !noalias !0
+; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX1_I]], align 4, !alias.scope [[META3]], !noalias [[META0]]
; CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[C]], align 4
; CHECK-NEXT: [[ARRAYIDX:%.*]] = getelementptr inbounds float, ptr [[A]], i64 7
; CHECK-NEXT: store float [[TMP1]], ptr [[ARRAYIDX]], align 4
@@ -64,43 +64,43 @@ entry:
define void @caller(ptr nocapture %a, ptr nocapture %b, ptr nocapture readonly %c_ptr) #0 {
; CHECK-LABEL: @caller(
; CHECK-NEXT: entry:
-; CHECK-NEXT: [[C:%.*]] = load ptr, ptr [[C_PTR:%.*]], align 8, !alias.scope !6
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]]), !noalias !6
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]]), !noalias !6
-; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[C]], align 4, !noalias !14
+; CHECK-NEXT: [[C:%.*]] = load ptr, ptr [[C_PTR:%.*]], align 8, !alias.scope [[META6:![0-9]+]]
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]]), !noalias [[META6]]
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]]), !noalias [[META6]]
+; CHECK-NEXT: [[TMP0:%.*]] = load float, ptr [[C]], align 4, !noalias [[META14:![0-9]+]]
; CHECK-NEXT: [[ARRAYIDX_I_I:%.*]] = getelementptr inbounds float, ptr [[A:%.*]], i64 5
-; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX_I_I]], align 4, !alias.scope !9, !noalias !15
+; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX_I_I]], align 4, !alias.scope [[META9]], !noalias [[META15:![0-9]+]]
; CHECK-NEXT: [[ARRAYIDX1_I_I:%.*]] = getelementptr inbounds float, ptr [[B:%.*]], i64 8
-; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX1_I_I]], align 4, !alias.scope !12, !noalias !16
-; CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[C]], align 4, !noalias !6
+; CHECK-NEXT: store float [[TMP0]], ptr [[ARRAYIDX1_I_I]], align 4, !alias.scope [[META12]], !noalias [[META16:![0-9]+]]
+; CHECK-NEXT: [[TMP1:%.*]] = load float, ptr [[C]], align 4, !noalias [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I:%.*]] = getelementptr inbounds float, ptr [[A]], i64 7
-; CHECK-NEXT: store float [[TMP1]], ptr [[ARRAYIDX_I]], align 4, !noalias !6
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]]), !alias.scope !6
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META20:![0-9]+]]), !alias.scope !6
-; CHECK-NEXT: [[TMP2:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6, !noalias !22
+; CHECK-NEXT: store float [[TMP1]], ptr [[ARRAYIDX_I]], align 4, !noalias [[META6]]
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]]), !alias.scope [[META6]]
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META20:![0-9]+]]), !alias.scope [[META6]]
+; CHECK-NEXT: [[TMP2:%.*]] = load float, ptr [[A]], align 4, !alias.scope [[META6]], !noalias [[META22:![0-9]+]]
; CHECK-NEXT: [[ARRAYIDX_I_I1:%.*]] = getelementptr inbounds float, ptr [[B]], i64 5
-; CHECK-NEXT: store float [[TMP2]], ptr [[ARRAYIDX_I_I1]], align 4, !alias.scope !23, !noalias !20
+; CHECK-NEXT: store float [[TMP2]], ptr [[ARRAYIDX_I_I1]], align 4, !alias.scope [[META23:![0-9]+]], !noalias [[META20]]
; CHECK-NEXT: [[ARRAYIDX1_I_I2:%.*]] = getelementptr inbounds float, ptr [[B]], i64 8
-; CHECK-NEXT: store float [[TMP2]], ptr [[ARRAYIDX1_I_I2]], align 4, !alias.scope !24, !noalias !17
-; CHECK-NEXT: [[TMP3:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6
+; CHECK-NEXT: store float [[TMP2]], ptr [[ARRAYIDX1_I_I2]], align 4, !alias.scope [[META24:![0-9]+]], !noalias [[META17]]
+; CHECK-NEXT: [[TMP3:%.*]] = load float, ptr [[A]], align 4, !alias.scope [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I3:%.*]] = getelementptr inbounds float, ptr [[B]], i64 7
-; CHECK-NEXT: store float [[TMP3]], ptr [[ARRAYIDX_I3]], align 4, !alias.scope !6
-; CHECK-NEXT: [[TMP4:%.*]] = load float, ptr [[C]], align 4, !noalias !6
+; CHECK-NEXT: store float [[TMP3]], ptr [[ARRAYIDX_I3]], align 4, !alias.scope [[META6]]
+; CHECK-NEXT: [[TMP4:%.*]] = load float, ptr [[C]], align 4, !noalias [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I_I4:%.*]] = getelementptr inbounds float, ptr [[A]], i64 5
-; CHECK-NEXT: store float [[TMP4]], ptr [[ARRAYIDX_I_I4]], align 4, !noalias !6
+; CHECK-NEXT: store float [[TMP4]], ptr [[ARRAYIDX_I_I4]], align 4, !noalias [[META6]]
; CHECK-NEXT: [[ARRAYIDX1_I_I5:%.*]] = getelementptr inbounds float, ptr [[B]], i64 8
-; CHECK-NEXT: store float [[TMP4]], ptr [[ARRAYIDX1_I_I5]], align 4, !noalias !6
-; CHECK-NEXT: [[TMP5:%.*]] = load float, ptr [[C]], align 4, !noalias !6
+; CHECK-NEXT: store float [[TMP4]], ptr [[ARRAYIDX1_I_I5]], align 4, !noalias [[META6]]
+; CHECK-NEXT: [[TMP5:%.*]] = load float, ptr [[C]], align 4, !noalias [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I6:%.*]] = getelementptr inbounds float, ptr [[A]], i64 7
-; CHECK-NEXT: store float [[TMP5]], ptr [[ARRAYIDX_I6]], align 4, !noalias !6
-; CHECK-NEXT: [[TMP6:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6
+; CHECK-NEXT: store float [[TMP5]], ptr [[ARRAYIDX_I6]], align 4, !noalias [[META6]]
+; CHECK-NEXT: [[TMP6:%.*]] = load float, ptr [[A]], align 4, !alias.scope [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I_I7:%.*]] = getelementptr inbounds float, ptr [[B]], i64 5
-; CHECK-NEXT: store float [[TMP6]], ptr [[ARRAYIDX_I_I7]], align 4, !alias.scope !6
+; CHECK-NEXT: store float [[TMP6]], ptr [[ARRAYIDX_I_I7]], align 4, !alias.scope [[META6]]
; CHECK-NEXT: [[ARRAYIDX1_I_I8:%.*]] = getelementptr inbounds float, ptr [[B]], i64 8
-; CHECK-NEXT: store float [[TMP6]], ptr [[ARRAYIDX1_I_I8]], align 4, !alias.scope !6
-; CHECK-NEXT: [[TMP7:%.*]] = load float, ptr [[A]], align 4, !alias.scope !6
+; CHECK-NEXT: store float [[TMP6]], ptr [[ARRAYIDX1_I_I8]], align 4, !alias.scope [[META6]]
+; CHECK-NEXT: [[TMP7:%.*]] = load float, ptr [[A]], align 4, !alias.scope [[META6]]
; CHECK-NEXT: [[ARRAYIDX_I9:%.*]] = getelementptr inbounds float, ptr [[B]], i64 7
-; CHECK-NEXT: store float [[TMP7]], ptr [[ARRAYIDX_I9]], align 4, !alias.scope !6
+; CHECK-NEXT: store float [[TMP7]], ptr [[ARRAYIDX_I9]], align 4, !alias.scope [[META6]]
; CHECK-NEXT: ret void
;
entry:
@@ -116,26 +116,26 @@ attributes #0 = { nounwind uwtable }
!0 = !{!1}
!1 = distinct !{!1, !2, !"hello: %a"}
-!2 = distinct !{!2, !"hello"}
+!2 = distinct !{!2, i1 false, !"hello"}
!3 = !{!4, !6}
!4 = distinct !{!4, !5, !"hello2: %a"}
-!5 = distinct !{!5, !"hello2"}
+!5 = distinct !{!5, i1 false, !"hello2"}
!6 = distinct !{!6, !5, !"hello2: %b"}
!7 = !{!4}
!8 = !{!6}
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"hello2: %a"}
-; CHECK: !2 = distinct !{!2, !"hello2"}
+; CHECK: !2 = distinct !{!2, i1 false, !"hello2"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"hello2: %b"}
; CHECK: !5 = !{!1, !4}
; CHECK: !6 = !{!7}
; CHECK: !7 = distinct !{!7, !8, !"hello: %a"}
-; CHECK: !8 = distinct !{!8, !"hello"}
+; CHECK: !8 = distinct !{!8, i1 false, !"hello"}
; CHECK: !9 = !{!10}
; CHECK: !10 = distinct !{!10, !11, !"hello2: %a"}
-; CHECK: !11 = distinct !{!11, !"hello2"}
+; CHECK: !11 = distinct !{!11, i1 false, !"hello2"}
; CHECK: !12 = !{!13}
; CHECK: !13 = distinct !{!13, !11, !"hello2: %b"}
; CHECK: !14 = !{!10, !13, !7}
@@ -143,7 +143,7 @@ attributes #0 = { nounwind uwtable }
; CHECK: !16 = !{!10, !7}
; CHECK: !17 = !{!18}
; CHECK: !18 = distinct !{!18, !19, !"hello2: %a"}
-; CHECK: !19 = distinct !{!19, !"hello2"}
+; CHECK: !19 = distinct !{!19, i1 false, !"hello2"}
; CHECK: !20 = !{!21}
; CHECK: !21 = distinct !{!21, !19, !"hello2: %b"}
; CHECK: !22 = !{!18, !21}
diff --git a/llvm/test/Transforms/Inline/noalias-escape-source.ll b/llvm/test/Transforms/Inline/noalias-escape-source.ll
index 09835cb75b780..1a0900271d508 100644
--- a/llvm/test/Transforms/Inline/noalias-escape-source.ll
+++ b/llvm/test/Transforms/Inline/noalias-escape-source.ll
@@ -93,11 +93,11 @@ define void @test_addr_only_capture(ptr %p) {
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"callee_no_capture: %p"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"callee_no_capture"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"callee_no_capture"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]], !"callee_capture: %p"}
-; CHECK: [[META5]] = distinct !{[[META5]], !"callee_capture"}
+; CHECK: [[META5]] = distinct !{[[META5]], i1 false, !"callee_capture"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]], !"callee_addr_only_capture: %p"}
-; CHECK: [[META8]] = distinct !{[[META8]], !"callee_addr_only_capture"}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false, !"callee_addr_only_capture"}
;.
diff --git a/llvm/test/Transforms/Inline/noalias.ll b/llvm/test/Transforms/Inline/noalias.ll
index 974e87a53fd9a..ef0e5fcf394cf 100644
--- a/llvm/test/Transforms/Inline/noalias.ll
+++ b/llvm/test/Transforms/Inline/noalias.ll
@@ -69,10 +69,10 @@ attributes #0 = { nounwind uwtable }
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"hello: %a"}
-; CHECK: !2 = distinct !{!2, !"hello"}
+; CHECK: !2 = distinct !{!2, i1 false, !"hello"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !5, !"hello2: %a"}
-; CHECK: !5 = distinct !{!5, !"hello2"}
+; CHECK: !5 = distinct !{!5, i1 false, !"hello2"}
; CHECK: !6 = !{!7}
; CHECK: !7 = distinct !{!7, !5, !"hello2: %b"}
; CHECK: !8 = !{!4, !7}
diff --git a/llvm/test/Transforms/Inline/noalias2.ll b/llvm/test/Transforms/Inline/noalias2.ll
index fcf1e3870afd0..60b0dce2bcad5 100644
--- a/llvm/test/Transforms/Inline/noalias2.ll
+++ b/llvm/test/Transforms/Inline/noalias2.ll
@@ -102,24 +102,24 @@ entry:
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"hello: %a"}
-; CHECK: !2 = distinct !{!2, !"hello"}
+; CHECK: !2 = distinct !{!2, i1 false, !"hello"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"hello: %c"}
; CHECK: !5 = !{!6}
; CHECK: !6 = distinct !{!6, !7, !"foo: %a"}
-; CHECK: !7 = distinct !{!7, !"foo"}
+; CHECK: !7 = distinct !{!7, i1 false, !"foo"}
; CHECK: !8 = !{!9}
; CHECK: !9 = distinct !{!9, !7, !"foo: %c"}
; CHECK: !10 = !{!11}
; CHECK: !11 = distinct !{!11, !12, !"hello: %a"}
-; CHECK: !12 = distinct !{!12, !"hello"}
+; CHECK: !12 = distinct !{!12, i1 false, !"hello"}
; CHECK: !13 = !{!14}
; CHECK: !14 = distinct !{!14, !12, !"hello: %c"}
; CHECK: !15 = !{!14, !9}
; CHECK: !16 = !{!11, !6}
; CHECK: !17 = !{!18}
; CHECK: !18 = distinct !{!18, !19, !"hello2: %a"}
-; CHECK: !19 = distinct !{!19, !"hello2"}
+; CHECK: !19 = distinct !{!19, i1 false, !"hello2"}
; CHECK: !20 = !{!21}
; CHECK: !21 = distinct !{!21, !19, !"hello2: %b"}
; CHECK: !22 = !{!18, !21}
diff --git a/llvm/test/Transforms/Inline/noalias3.ll b/llvm/test/Transforms/Inline/noalias3.ll
index b9054363fe08a..6bea881539d80 100644
--- a/llvm/test/Transforms/Inline/noalias3.ll
+++ b/llvm/test/Transforms/Inline/noalias3.ll
@@ -32,4 +32,4 @@ dummy:
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
diff --git a/llvm/test/Transforms/Inline/pr48209.ll b/llvm/test/Transforms/Inline/pr48209.ll
index 29813d18458c6..34bb285aa8cf8 100644
--- a/llvm/test/Transforms/Inline/pr48209.ll
+++ b/llvm/test/Transforms/Inline/pr48209.ll
@@ -22,4 +22,4 @@ define void @test(ptr %p) {
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
diff --git a/llvm/test/Transforms/Inline/pr50270.ll b/llvm/test/Transforms/Inline/pr50270.ll
index e1798f474b4ba..071e53335add1 100644
--- a/llvm/test/Transforms/Inline/pr50270.ll
+++ b/llvm/test/Transforms/Inline/pr50270.ll
@@ -68,4 +68,4 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{!1}
!1 = !{!1, !2, !"scope"}
-!2 = !{!2, !"domain"}
+!2 = !{!2, i1 false, !"domain"}
diff --git a/llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll b/llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll
index 85868da11db35..dd02c80fe849e 100644
--- a/llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll
+++ b/llvm/test/Transforms/InstCombine/AMDGPU/memcpy-from-constant.ll
@@ -235,4 +235,4 @@ attributes #1 = { nounwind readnone speculatable }
!0 = !{!1}
!1 = !{!1, !2}
-!2 = !{!2}
+!2 = !{!2, i1 false}
diff --git a/llvm/test/Transforms/InstCombine/bitcast-store.ll b/llvm/test/Transforms/InstCombine/bitcast-store.ll
index 3f5dac8bf0f45..c25f97d658071 100644
--- a/llvm/test/Transforms/InstCombine/bitcast-store.ll
+++ b/llvm/test/Transforms/InstCombine/bitcast-store.ll
@@ -71,5 +71,5 @@ entry:
!0 = !{!1}
!1 = !{!1, !2}
-!2 = !{!2}
+!2 = !{!2, i1 false}
!3 = distinct !{}
diff --git a/llvm/test/Transforms/InstCombine/fold-phi-load-metadata.ll b/llvm/test/Transforms/InstCombine/fold-phi-load-metadata.ll
index dc399b67c4a17..598c64bfe04cb 100644
--- a/llvm/test/Transforms/InstCombine/fold-phi-load-metadata.ll
+++ b/llvm/test/Transforms/InstCombine/fold-phi-load-metadata.ll
@@ -78,7 +78,7 @@ return: ; preds = %if.end, %if.then
!5 = !{!"omnipotent char", !6, i64 0}
!6 = !{!"Simple C/C++ TBAA"}
!7 = !{!"float", !5, i64 0}
-!8 = !{!8, !"some domain"}
+!8 = !{!8, i1 false, !"some domain"}
!9 = !{!9, !8, !"scope0"}
!10 = !{!10, !8, !"scope1"}
!11 = !{!11, !8, !"scope2"}
diff --git a/llvm/test/Transforms/InstCombine/load-combine-metadata.ll b/llvm/test/Transforms/InstCombine/load-combine-metadata.ll
index c456d0f5ed21b..baeb925058e6f 100644
--- a/llvm/test/Transforms/InstCombine/load-combine-metadata.ll
+++ b/llvm/test/Transforms/InstCombine/load-combine-metadata.ll
@@ -21,7 +21,7 @@ define void @test_load_load_combine_metadata(ptr, ptr, ptr) {
; CHECK: ![[RANGE]] = !{i32 0, i32 5}
!0 = !{ i32 0, i32 5 }
!1 = !{ i32 7, i32 9 }
-!2 = !{!2}
+!2 = !{!2, i1 false}
!3 = !{!3, !2}
!4 = !{!4, !2}
!5 = !{!3}
diff --git a/llvm/test/Transforms/InstCombine/loadstore-metadata.ll b/llvm/test/Transforms/InstCombine/loadstore-metadata.ll
index 3de4c2dd8df15..b50cdfc207226 100644
--- a/llvm/test/Transforms/InstCombine/loadstore-metadata.ll
+++ b/llvm/test/Transforms/InstCombine/loadstore-metadata.ll
@@ -415,7 +415,7 @@ entry:
!2 = !{!"root"}
!3 = !{!4}
!4 = distinct !{!4, !5}
-!5 = distinct !{!5}
+!5 = distinct !{!5, i1 false}
!6 = !{i32 0, i32 42}
!7 = distinct !{}
!8 = !{i32 1}
@@ -426,7 +426,7 @@ entry:
!13 = distinct !{}
!14 = !{!15}
!15 = distinct !{!15, !16}
-!16 = distinct !{!16}
+!16 = distinct !{!16, i1 false}
!17 = !{ i32 0, !18 }
!18 = !{ !"nvvm.l1_eviction", !"first" }
@@ -436,7 +436,7 @@ entry:
; CHECK: [[META2]] = !{!"root"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]]}
-; CHECK: [[META5]] = distinct !{[[META5]]}
+; CHECK: [[META5]] = distinct !{[[META5]], i1 false}
; CHECK: [[META6]] = distinct !{}
; CHECK: [[META7]] = !{i32 1}
; CHECK: [[META8]] = !{i64 8}
@@ -446,7 +446,7 @@ entry:
; CHECK: [[RNG12]] = !{i32 0, i32 42}
; CHECK: [[META13]] = !{[[META14:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META15:![0-9]+]]}
-; CHECK: [[META15]] = distinct !{[[META15]]}
+; CHECK: [[META15]] = distinct !{[[META15]], i1 false}
; CHECK: [[ACC_GRP16]] = distinct !{}
; CHECK: [[META17]] = !{i32 3}
; CHECK: [[META18]] = !{i32 0, [[META19:![0-9]+]]}
diff --git a/llvm/test/Transforms/InstCombine/memcpy-to-load.ll b/llvm/test/Transforms/InstCombine/memcpy-to-load.ll
index f8e8ab85f935a..d258e521d7c3d 100644
--- a/llvm/test/Transforms/InstCombine/memcpy-to-load.ll
+++ b/llvm/test/Transforms/InstCombine/memcpy-to-load.ll
@@ -89,8 +89,8 @@ define void @copy_8_bytes_noalias(ptr %d, ptr %s) {
ret void
}
-!0 = distinct !{!0, !"The domain"}
-!1 = distinct !{!1}
+!0 = distinct !{!0, i1 false, !"The domain"}
+!1 = distinct !{!1, i1 false}
!2 = !{!2, !0}
!3 = !{!3, !1}
!4 = !{!2}
diff --git a/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll b/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
new file mode 100644
index 0000000000000..20bd94bdf221f
--- /dev/null
+++ b/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
@@ -0,0 +1,95 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 6
+; RUN: opt -passes=instcombine -S < %s | FileCheck %s
+
+define void @two_scopes_of_disjoint_domain_used_keep(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @two_scopes_of_disjoint_domain_used_keep(
+; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META3:![0-9]+]]
+; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !0)
+ store i8 42, ptr %ptr0, !alias.scope !0
+ store i8 43, ptr %ptr1, !alias.scope !3
+ ret void
+}
+
+define void @one_scope_of_disjoint_domain_used(ptr %ptr0) {
+; CHECK-LABEL: define void @one_scope_of_disjoint_domain_used(
+; CHECK-SAME: ptr [[PTR0:%.*]]) {
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !0)
+ store i8 42, ptr %ptr0, !alias.scope !0
+ ret void
+}
+
+define void @same_scope_of_disjoint_domain_twice(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @same_scope_of_disjoint_domain_twice(
+; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META5:![0-9]+]]
+; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !0)
+ store i8 42, ptr %ptr0, !alias.scope !0
+ store i8 43, ptr %ptr1, !alias.scope !5
+ ret void
+}
+
+define void @declared_scope_of_disjoint_domain_unused(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @declared_scope_of_disjoint_domain_unused(
+; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META3]]
+; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !8)
+ store i8 42, ptr %ptr0, !alias.scope !0
+ store i8 43, ptr %ptr1, !alias.scope !3
+ ret void
+}
+
+define void @two_scopes_of_plain_domain_used(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @two_scopes_of_plain_domain_used(
+; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META8:![0-9]+]]
+; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META9:![0-9]+]]
+; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !10)
+ store i8 42, ptr %ptr0, !alias.scope !10
+ store i8 43, ptr %ptr1, !alias.scope !11
+ ret void
+}
+
+declare void @llvm.experimental.noalias.scope.decl(metadata)
+
+!0 = !{!1}
+!1 = distinct !{!1, !2}
+!2 = distinct !{!2, i1 true}
+!3 = !{!4}
+!4 = distinct !{!4, !2}
+!5 = !{!1, !6}
+!6 = distinct !{!6, !7}
+!7 = distinct !{!7, i1 false}
+!8 = !{!9}
+!9 = distinct !{!9, !2}
+!10 = !{!6}
+!11 = !{!12}
+!12 = distinct !{!12, !7}
+;.
+; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
+; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 true}
+; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
+; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
+; CHECK: [[META5]] = !{[[META1]], [[META6:![0-9]+]]}
+; CHECK: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]]}
+; CHECK: [[META7]] = distinct !{[[META7]], i1 false}
+; CHECK: [[META8]] = !{[[META6]]}
+; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
+; CHECK: [[META10]] = distinct !{[[META10]], [[META7]]}
+;.
diff --git a/llvm/test/Transforms/InstCombine/noalias-scope-decl.ll b/llvm/test/Transforms/InstCombine/noalias-scope-decl.ll
index be3c33e528c54..078cfad85811a 100644
--- a/llvm/test/Transforms/InstCombine/noalias-scope-decl.ll
+++ b/llvm/test/Transforms/InstCombine/noalias-scope-decl.ll
@@ -164,7 +164,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{ !1 }
!1 = distinct !{ !1, !2 }
-!2 = distinct !{ !2 }
+!2 = distinct !{!2, i1 false}
!3 = !{ !4 }
!4 = distinct !{ !4, !2 }
!5 = !{ !1, !4 }
diff --git a/llvm/test/Transforms/InstCombine/select-masked_load.ll b/llvm/test/Transforms/InstCombine/select-masked_load.ll
index f0c2e8c8845cf..dd49fdeecbc51 100644
--- a/llvm/test/Transforms/InstCombine/select-masked_load.ll
+++ b/llvm/test/Transforms/InstCombine/select-masked_load.ll
@@ -214,7 +214,7 @@ define <8 x i16> @fold_sel_into_masked_load_drop_attrs(ptr %ptr, <8 x i1> %mask,
!2 = !{!"omnipotent char", !8, i64 0}
!3 = !{!4}
!4 = distinct !{!4, !5, !"scope"}
-!5 = distinct !{!5, !"domain"}
+!5 = distinct !{!5, i1 false, !"domain"}
!6 = !{!7}
!7 = distinct !{!7, !5, !"noscope"}
!8 = !{!"Simple C/C++ TBAA"}
diff --git a/llvm/test/Transforms/JumpThreading/free_instructions.ll b/llvm/test/Transforms/JumpThreading/free_instructions.ll
index 48bedc72c2d31..a1ebd0786b0c5 100644
--- a/llvm/test/Transforms/JumpThreading/free_instructions.ll
+++ b/llvm/test/Transforms/JumpThreading/free_instructions.ll
@@ -57,4 +57,4 @@ declare ptr @llvm.launder.invariant.group.p0(ptr)
!0 = !{!1}
!1 = distinct !{!1, !2, !"scope"}
-!2 = distinct !{!2, !"domain"}
+!2 = distinct !{!2, i1 false, !"domain"}
diff --git a/llvm/test/Transforms/JumpThreading/noalias-scope-decl.ll b/llvm/test/Transforms/JumpThreading/noalias-scope-decl.ll
index b4979017b67e8..f5d83b83f87a5 100644
--- a/llvm/test/Transforms/JumpThreading/noalias-scope-decl.ll
+++ b/llvm/test/Transforms/JumpThreading/noalias-scope-decl.ll
@@ -98,24 +98,93 @@ fb:
ret void
}
+; Scopes of a domain with disjoint scopes have to be cloned into a clone of
+; that domain: the copies of a duplicated access are in the same memory region,
+; so they must not become implicitly noalias with each other.
+define void @clone_disjoint_domain(ptr %p) {
+; CHECK-LABEL: @clone_disjoint_domain(
+; CHECK-NEXT: entry:
+; CHECK-NEXT: [[C:%.*]] = call i1 @opaque()
+; CHECK-NEXT: br i1 [[C]], label [[PRED:%.*]], label [[BB:%.*]]
+; CHECK: pred:
+; CHECK-NEXT: [[PV:%.*]] = call i1 @opaque()
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META9:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META12:![0-9]+]])
+; CHECK-NEXT: store i8 0, ptr [[P:%.*]], align 1, !alias.scope [[META9]]
+; CHECK-NEXT: store i8 1, ptr [[P]], align 1, !alias.scope [[META12]]
+; CHECK-NEXT: br i1 [[PV]], label [[TB:%.*]], label [[FB:%.*]]
+; CHECK: bb:
+; CHECK-NEXT: [[OV:%.*]] = call i1 @opaque()
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META14:![0-9]+]])
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META17:![0-9]+]])
+; CHECK-NEXT: store i8 0, ptr [[P]], align 1, !alias.scope [[META14]]
+; CHECK-NEXT: store i8 1, ptr [[P]], align 1, !alias.scope [[META17]]
+; CHECK-NEXT: br i1 [[OV]], label [[TB]], label [[FB]]
+; CHECK: tb:
+; CHECK-NEXT: ret void
+; CHECK: fb:
+; CHECK-NEXT: ret void
+;
+entry:
+ %c = call i1 @opaque()
+ br i1 %c, label %pred, label %other
+
+pred:
+ %pv = call i1 @opaque()
+ br label %bb
+
+other:
+ %ov = call i1 @opaque()
+ br label %bb
+
+bb:
+ %x = phi i1 [ %pv, %pred ], [ %ov, %other ]
+ call void @llvm.experimental.noalias.scope.decl(metadata !5)
+ call void @llvm.experimental.noalias.scope.decl(metadata !7)
+ store i8 0, ptr %p, !alias.scope !5
+ store i8 1, ptr %p, !alias.scope !7
+ br i1 %x, label %tb, label %fb
+
+tb:
+ ret void
+
+fb:
+ ret void
+}
+
declare i1 @opaque()
declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{!1}
!1 = distinct !{!1, !2, !"scope1"}
-!2 = distinct !{!2, !"domain"}
+!2 = distinct !{!2, i1 false, !"domain"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"scope2"}
+!5 = !{!6}
+!6 = distinct !{!6, !8, !"disjoint scope1"}
+!7 = !{!9}
+!8 = distinct !{!8, i1 true, !"disjoint domain"}
+!9 = distinct !{!9, !8, !"disjoint scope2"}
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { nocallback nofree nosync nounwind willreturn memory(inaccessiblemem: readwrite) }
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"scope1"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"domain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"domain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]], !"scope2"}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META2]], !"scope2:thread"}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META2]], !"scope1:thread"}
+; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
+; CHECK: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"disjoint scope1:thread"}
+; CHECK: [[META11]] = distinct !{[[META11]], i1 true, !"disjoint domain"}
+; CHECK: [[META12]] = !{[[META13:![0-9]+]]}
+; CHECK: [[META13]] = distinct !{[[META13]], [[META11]], !"disjoint scope2:thread"}
+; CHECK: [[META14]] = !{[[META15:![0-9]+]]}
+; CHECK: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]], !"disjoint scope1"}
+; CHECK: [[META16]] = distinct !{[[META16]], i1 true, !"disjoint domain"}
+; CHECK: [[META17]] = !{[[META18:![0-9]+]]}
+; CHECK: [[META18]] = distinct !{[[META18]], [[META16]], !"disjoint scope2"}
;.
diff --git a/llvm/test/Transforms/JumpThreading/thread-loads.ll b/llvm/test/Transforms/JumpThreading/thread-loads.ll
index cb10168547d2a..712a3090e182c 100644
--- a/llvm/test/Transforms/JumpThreading/thread-loads.ll
+++ b/llvm/test/Transforms/JumpThreading/thread-loads.ll
@@ -463,7 +463,7 @@ define fastcc i32 @Search(i64 %idxprom.i, i64 %idxprom.i89, i32 %c) {
; CHECK-NEXT: [[ARRAYIDX185:%.*]] = getelementptr inbounds [65 x i32], ptr @hash_move, i64 0, i64 [[IDXPROM_I]]
; CHECK-NEXT: [[ARRAYIDX307:%.*]] = getelementptr inbounds [65 x i32], ptr @current_move, i64 0, i64 [[IDXPROM_I]]
; CHECK-NEXT: [[ARRAYIDX89:%.*]] = getelementptr inbounds [65 x ptr], ptr @last, i64 0, i64 [[IDXPROM_I]]
-; CHECK-NEXT: [[PHASE:%.*]] = getelementptr inbounds [65 x %struct.NEXT_MOVE], ptr @next_status, i64 0, i64 [[IDXPROM_I]], i32 0
+; CHECK-NEXT: [[PHASE:%.*]] = getelementptr inbounds [65 x [[STRUCT_NEXT_MOVE:%.*]]], ptr @next_status, i64 0, i64 [[IDXPROM_I]], i32 0
; CHECK-NEXT: switch i32 [[C]], label %[[CLEANUP:.*]] [
; CHECK-NEXT: i32 1, label %[[SW_BB_I:.*]]
; CHECK-NEXT: i32 0, label %[[SW_BB21_I:.*]]
@@ -700,7 +700,7 @@ right_x:
!3 = !{!"int", !1}
!4 = !{ i32 0, i32 1 }
!5 = !{ i32 8, i32 10 }
-!6 = !{!6}
+!6 = !{!6, i1 false}
!7 = !{!7, !6}
!8 = !{!8, !6}
!9 = !{!7}
@@ -714,7 +714,7 @@ right_x:
; CHECK: [[RNG4]] = !{i32 0, i32 1}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]]}
-; CHECK: [[META7]] = distinct !{[[META7]]}
+; CHECK: [[META7]] = distinct !{[[META7]], i1 false}
; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
; CHECK: [[META9]] = distinct !{[[META9]], [[META7]]}
; CHECK: [[META10]] = !{}
diff --git a/llvm/test/Transforms/LICM/AMDGPU/buffer-rsrc-ptrs.ll b/llvm/test/Transforms/LICM/AMDGPU/buffer-rsrc-ptrs.ll
index a3dfa91195343..cb3e4589b1e9d 100644
--- a/llvm/test/Transforms/LICM/AMDGPU/buffer-rsrc-ptrs.ll
+++ b/llvm/test/Transforms/LICM/AMDGPU/buffer-rsrc-ptrs.ll
@@ -104,7 +104,7 @@ loop:
tail:
ret void
}
-!0 = !{!0, !"hoisting"}
+!0 = !{!0, i1 false, !"hoisting"}
!1 = !{!1, !0, !"p"}
!2 = !{!2, !0, !"q"}
diff --git a/llvm/test/Transforms/LICM/dropped-tbaa.ll b/llvm/test/Transforms/LICM/dropped-tbaa.ll
index 92839f1d19968..6cfcc8a4ff958 100644
--- a/llvm/test/Transforms/LICM/dropped-tbaa.ll
+++ b/llvm/test/Transforms/LICM/dropped-tbaa.ll
@@ -83,6 +83,6 @@ attributes #0 = { argmemonly nounwind }
!6 = !{!"double", !3, i64 0}
!7 = !{!8}
!8 = distinct !{!8, !9, !"add: %addend"}
-!9 = distinct !{!9, !"add"}
+!9 = distinct !{!9, i1 false, !"add"}
!10 = !{!11}
!11 = distinct !{!11, !9, !"add: %data"}
diff --git a/llvm/test/Transforms/LICM/hoist-metadata.ll b/llvm/test/Transforms/LICM/hoist-metadata.ll
index f25cb966a37fc..efe5d74650f4b 100644
--- a/llvm/test/Transforms/LICM/hoist-metadata.ll
+++ b/llvm/test/Transforms/LICM/hoist-metadata.ll
@@ -125,7 +125,7 @@ exit:
!3 = !{!"Simple C/C++ TBAA"}
!4 = !{!5}
!5 = distinct !{!5, !6}
-!6 = distinct !{!6}
+!6 = distinct !{!6, i1 false}
;.
; CHECK: attributes #[[ATTR0:[0-9]+]] = { memory(none) }
;.
diff --git a/llvm/test/Transforms/LICM/licm-ci.ll b/llvm/test/Transforms/LICM/licm-ci.ll
index b818442f994fc..a4b87a2da5e46 100644
--- a/llvm/test/Transforms/LICM/licm-ci.ll
+++ b/llvm/test/Transforms/LICM/licm-ci.ll
@@ -33,6 +33,6 @@ exit: ; preds = %loop
ret i16 %reduce
}
-!0 = !{!0}
+!0 = !{!0, i1 false}
!1 = !{!1, !0}
!2 = !{!1}
diff --git a/llvm/test/Transforms/LICM/pr42969.ll b/llvm/test/Transforms/LICM/pr42969.ll
index ba02fbb72e710..72f796957c664 100644
--- a/llvm/test/Transforms/LICM/pr42969.ll
+++ b/llvm/test/Transforms/LICM/pr42969.ll
@@ -62,7 +62,7 @@ exit.block: ; preds = %scalar.cleanup
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2, !"LVerDomain"}
+!2 = distinct !{!2, i1 false, !"LVerDomain"}
!3 = !{!4}
!4 = distinct !{!4, !2}
!5 = !{!"Simple C++ TBAA"}
diff --git a/llvm/test/Transforms/LICM/scalar-promote.ll b/llvm/test/Transforms/LICM/scalar-promote.ll
index be57f3072c6b9..94fe6cdd91ab0 100644
--- a/llvm/test/Transforms/LICM/scalar-promote.ll
+++ b/llvm/test/Transforms/LICM/scalar-promote.ll
@@ -1023,7 +1023,7 @@ exit:
!3 = !{!5, !5, i64 0}
!4 = !{!"int", !1}
!5 = !{!"float", !1}
-!6 = !{!6}
+!6 = !{!6, i1 false}
!7 = !{!7, !6}
!8 = !{!7}
@@ -1037,5 +1037,5 @@ exit:
; CHECK: [[META5]] = !{!"float", [[META2]]}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK: [[META8]] = distinct !{[[META8]]}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false}
;.
diff --git a/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/aa-metadata.ll b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/aa-metadata.ll
index 354537acf1218..473082c83f46a 100644
--- a/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/aa-metadata.ll
+++ b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/aa-metadata.ll
@@ -34,4 +34,4 @@ attributes #0 = { nounwind }
!0 = !{!1}
!1 = distinct !{!1, !2, !"some scope"}
-!2 = distinct !{!2, !"some domain"}
+!2 = distinct !{!2, i1 false, !"some domain"}
diff --git a/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/fence-noalias-metadata.ll b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/fence-noalias-metadata.ll
index 5a73e7b31ca54..1c58c13408f45 100644
--- a/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/fence-noalias-metadata.ll
+++ b/llvm/test/Transforms/LoadStoreVectorizer/AMDGPU/fence-noalias-metadata.ll
@@ -110,7 +110,7 @@ declare void @use(i32)
; Metadata: three noalias scopes in the same domain.
!0 = !{!1}
!1 = distinct !{!1, !2, !"arg_scope"}
-!2 = distinct !{!2, !"kernel_domain"}
+!2 = distinct !{!2, i1 false, !"kernel_domain"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"other_arg_scope"}
!5 = !{!1, !4}
@@ -119,7 +119,7 @@ declare void @use(i32)
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"arg_scope"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"kernel_domain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"kernel_domain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]], !"other_arg_scope"}
; CHECK: [[META5]] = !{[[META1]], [[META4]]}
diff --git a/llvm/test/Transforms/LoopDeletion/noalias.ll b/llvm/test/Transforms/LoopDeletion/noalias.ll
index 0f3b71df94270..8b8dfa0f48daf 100644
--- a/llvm/test/Transforms/LoopDeletion/noalias.ll
+++ b/llvm/test/Transforms/LoopDeletion/noalias.ll
@@ -25,4 +25,4 @@ for.body:
!0 = !{!1}
!1 = distinct !{!1, !2, !"x: %a"}
-!2 = distinct !{!2, !"x"}
+!2 = distinct !{!2, i1 false, !"x"}
diff --git a/llvm/test/Transforms/LoopDistribute/bounds-expansion-bug.ll b/llvm/test/Transforms/LoopDistribute/bounds-expansion-bug.ll
index d867a574110b2..16c5fbe3dbcf3 100644
--- a/llvm/test/Transforms/LoopDistribute/bounds-expansion-bug.ll
+++ b/llvm/test/Transforms/LoopDistribute/bounds-expansion-bug.ll
@@ -185,7 +185,7 @@ for.end: ; preds = %for.body
; CHECK: [[META1]] = !{!"llvm.loop.isdistributed", i32 1}
; CHECK: [[META2]] = !{[[META3:![0-9]+]]}
; CHECK: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]]}
-; CHECK: [[META4]] = distinct !{[[META4]], !"LVerDomain"}
+; CHECK: [[META4]] = distinct !{[[META4]], i1 false, !"LVerDomain"}
; CHECK: [[META5]] = !{[[META6:![0-9]+]], [[META7:![0-9]+]], [[META8:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META4]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META4]]}
diff --git a/llvm/test/Transforms/LoopDistribute/cross-partition-access.ll b/llvm/test/Transforms/LoopDistribute/cross-partition-access.ll
index f9c1b365a6b2b..da7613be31247 100644
--- a/llvm/test/Transforms/LoopDistribute/cross-partition-access.ll
+++ b/llvm/test/Transforms/LoopDistribute/cross-partition-access.ll
@@ -148,7 +148,7 @@ end: ; preds = %end.loopexit, %entr
; CHECK: [[META6]] = !{!"llvm.loop.isdistributed", i32 1}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]]}
-; CHECK: [[META9]] = distinct !{[[META9]], !"LVerDomain"}
+; CHECK: [[META9]] = distinct !{[[META9]], i1 false, !"LVerDomain"}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META9]]}
; CHECK: [[META12]] = !{[[META13:![0-9]+]], [[META14:![0-9]+]], [[META8]]}
diff --git a/llvm/test/Transforms/LoopDistribute/followup.ll b/llvm/test/Transforms/LoopDistribute/followup.ll
index 2753bad5e1c1e..091e1c4b7a177 100644
--- a/llvm/test/Transforms/LoopDistribute/followup.ll
+++ b/llvm/test/Transforms/LoopDistribute/followup.ll
@@ -137,7 +137,7 @@ for.end:
; CHECK: [[META3]] = !{!"llvm.loop.isdistributed", i32 1}
; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META6:![0-9]+]]}
-; CHECK: [[META6]] = distinct !{[[META6]], !"LVerDomain"}
+; CHECK: [[META6]] = distinct !{[[META6]], i1 false, !"LVerDomain"}
; CHECK: [[META7]] = !{[[META8:![0-9]+]], [[META9:![0-9]+]], [[META10:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META6]]}
; CHECK: [[META9]] = distinct !{[[META9]], [[META6]]}
diff --git a/llvm/test/Transforms/LoopDistribute/no-reprocess.ll b/llvm/test/Transforms/LoopDistribute/no-reprocess.ll
index 2dbc77aa756f6..7043eeabe1268 100644
--- a/llvm/test/Transforms/LoopDistribute/no-reprocess.ll
+++ b/llvm/test/Transforms/LoopDistribute/no-reprocess.ll
@@ -119,7 +119,7 @@ end: ; preds = %end.loopexit, %entr
!6 = !{!"llvm.loop.isdistributed", i32 1}
!7 = !{!8}
!8 = distinct !{!8, !9}
-!9 = distinct !{!9, !"LVerDomain"}
+!9 = distinct !{!9, i1 false, !"LVerDomain"}
!10 = !{!11}
!11 = distinct !{!11, !9}
!12 = !{!13, !14, !8}
diff --git a/llvm/test/Transforms/LoopDistribute/non-lcssa-input.ll b/llvm/test/Transforms/LoopDistribute/non-lcssa-input.ll
index 731a2e055e4dc..c88d1e5d6d348 100644
--- a/llvm/test/Transforms/LoopDistribute/non-lcssa-input.ll
+++ b/llvm/test/Transforms/LoopDistribute/non-lcssa-input.ll
@@ -224,7 +224,7 @@ outer.exit:
; CHECK: [[META1]] = !{!"llvm.loop.isdistributed", i32 1}
; CHECK: [[META2]] = !{[[META3:![0-9]+]]}
; CHECK: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]]}
-; CHECK: [[META4]] = distinct !{[[META4]], !"LVerDomain"}
+; CHECK: [[META4]] = distinct !{[[META4]], i1 false, !"LVerDomain"}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META4]]}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
@@ -232,7 +232,7 @@ outer.exit:
; CHECK: [[LOOP9]] = distinct !{[[LOOP9]], [[META1]]}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]]}
-; CHECK: [[META12]] = distinct !{[[META12]], !"LVerDomain"}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false, !"LVerDomain"}
; CHECK: [[META13]] = !{[[META14:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META12]]}
; CHECK: [[META15]] = !{[[META16:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopDistribute/outside-use.ll b/llvm/test/Transforms/LoopDistribute/outside-use.ll
index 661f8062ae268..f9ed2170d1652 100644
--- a/llvm/test/Transforms/LoopDistribute/outside-use.ll
+++ b/llvm/test/Transforms/LoopDistribute/outside-use.ll
@@ -52,19 +52,19 @@ define void @f() {
; CHECK-NEXT: [[LOADC_LVER_ORIG:%.*]] = load i32, ptr [[ARRAYIDXC_LVER_ORIG]], align 4
; CHECK-NEXT: [[SUM_ADD_LVER_ORIG]] = add nuw nsw i32 [[SUM_LVER_ORIG]], [[LOADC_LVER_ORIG]]
; CHECK-NEXT: [[EXITCOND_LVER_ORIG:%.*]] = icmp eq i64 [[ADD_LVER_ORIG]], 20
-; CHECK-NEXT: br i1 [[EXITCOND_LVER_ORIG]], label %[[FOR_END_LOOPEXIT:.*]], label %[[FOR_BODY_LVER_ORIG]]
+; CHECK-NEXT: br i1 [[EXITCOND_LVER_ORIG]], label %[[FOR_END_LOOPEXIT:.*]], label %[[FOR_BODY_LVER_ORIG]], !llvm.loop [[LOOP0:![0-9]+]]
; CHECK: [[FOR_BODY_PH_LDIST1]]:
; CHECK-NEXT: br label %[[FOR_BODY_LDIST1:.*]]
; CHECK: [[FOR_BODY_LDIST1]]:
; CHECK-NEXT: [[IND_LDIST1:%.*]] = phi i64 [ 0, %[[FOR_BODY_PH_LDIST1]] ], [ [[ADD_LDIST1:%.*]], %[[FOR_BODY_LDIST1]] ]
; CHECK-NEXT: [[ARRAYIDXA_LDIST1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[IND_LDIST1]]
-; CHECK-NEXT: [[LOADA_LDIST1:%.*]] = load i32, ptr [[ARRAYIDXA_LDIST1]], align 4, !alias.scope [[META0:![0-9]+]], !noalias [[META3:![0-9]+]]
+; CHECK-NEXT: [[LOADA_LDIST1:%.*]] = load i32, ptr [[ARRAYIDXA_LDIST1]], align 4, !alias.scope [[META2:![0-9]+]], !noalias [[META5:![0-9]+]]
; CHECK-NEXT: [[ARRAYIDXB_LDIST1:%.*]] = getelementptr inbounds i32, ptr [[B]], i64 [[IND_LDIST1]]
-; CHECK-NEXT: [[LOADB_LDIST1:%.*]] = load i32, ptr [[ARRAYIDXB_LDIST1]], align 4, !alias.scope [[META5:![0-9]+]]
+; CHECK-NEXT: [[LOADB_LDIST1:%.*]] = load i32, ptr [[ARRAYIDXB_LDIST1]], align 4, !alias.scope [[META7:![0-9]+]]
; CHECK-NEXT: [[MULA_LDIST1:%.*]] = mul i32 [[LOADB_LDIST1]], [[LOADA_LDIST1]]
; CHECK-NEXT: [[ADD_LDIST1]] = add nuw nsw i64 [[IND_LDIST1]], 1
; CHECK-NEXT: [[ARRAYIDXA_PLUS_4_LDIST1:%.*]] = getelementptr inbounds i32, ptr [[A]], i64 [[ADD_LDIST1]]
-; CHECK-NEXT: store i32 [[MULA_LDIST1]], ptr [[ARRAYIDXA_PLUS_4_LDIST1]], align 4, !alias.scope [[META0]], !noalias [[META3]]
+; CHECK-NEXT: store i32 [[MULA_LDIST1]], ptr [[ARRAYIDXA_PLUS_4_LDIST1]], align 4, !alias.scope [[META2]], !noalias [[META5]]
; CHECK-NEXT: [[EXITCOND_LDIST1:%.*]] = icmp eq i64 [[ADD_LDIST1]], 20
; CHECK-NEXT: br i1 [[EXITCOND_LDIST1]], label %[[FOR_BODY_PH:.*]], label %[[FOR_BODY_LDIST1]]
; CHECK: [[FOR_BODY_PH]]:
@@ -74,18 +74,18 @@ define void @f() {
; CHECK-NEXT: [[SUM:%.*]] = phi i32 [ 0, %[[FOR_BODY_PH]] ], [ [[SUM_ADD:%.*]], %[[FOR_BODY]] ]
; CHECK-NEXT: [[ADD]] = add nuw nsw i64 [[IND]], 1
; CHECK-NEXT: [[ARRAYIDXC:%.*]] = getelementptr inbounds i32, ptr [[C]], i64 [[IND]]
-; CHECK-NEXT: [[LOADC:%.*]] = load i32, ptr [[ARRAYIDXC]], align 4, !alias.scope [[META3]]
+; CHECK-NEXT: [[LOADC:%.*]] = load i32, ptr [[ARRAYIDXC]], align 4, !alias.scope [[META5]]
; CHECK-NEXT: [[SUM_ADD]] = add nuw nsw i32 [[SUM]], [[LOADC]]
; CHECK-NEXT: [[EXITCOND:%.*]] = icmp eq i64 [[ADD]], 20
; CHECK-NEXT: br i1 [[EXITCOND]], label %[[FOR_END_LOOPEXIT2:.*]], label %[[FOR_BODY]]
; CHECK: [[FOR_END_LOOPEXIT]]:
-; CHECK-NEXT: [[SUM_ADD_LVER_PH:%.*]] = phi i32 [ [[SUM_ADD_LVER_ORIG]], %[[FOR_BODY_LVER_ORIG]] ]
+; CHECK-NEXT: [[SUM_ADD_LCSSA_PH:%.*]] = phi i32 [ [[SUM_ADD_LVER_ORIG]], %[[FOR_BODY_LVER_ORIG]] ]
; CHECK-NEXT: br label %[[FOR_END:.*]]
; CHECK: [[FOR_END_LOOPEXIT2]]:
-; CHECK-NEXT: [[SUM_ADD_LVER_PH3:%.*]] = phi i32 [ [[SUM_ADD]], %[[FOR_BODY]] ]
+; CHECK-NEXT: [[SUM_ADD_LCSSA_PH3:%.*]] = phi i32 [ [[SUM_ADD]], %[[FOR_BODY]] ]
; CHECK-NEXT: br label %[[FOR_END]]
; CHECK: [[FOR_END]]:
-; CHECK-NEXT: [[SUM_ADD_LVER:%.*]] = phi i32 [ [[SUM_ADD_LVER_PH]], %[[FOR_END_LOOPEXIT]] ], [ [[SUM_ADD_LVER_PH3]], %[[FOR_END_LOOPEXIT2]] ]
+; CHECK-NEXT: [[SUM_ADD_LVER:%.*]] = phi i32 [ [[SUM_ADD_LCSSA_PH]], %[[FOR_END_LOOPEXIT]] ], [ [[SUM_ADD_LCSSA_PH3]], %[[FOR_END_LOOPEXIT2]] ]
; CHECK-NEXT: store i32 [[SUM_ADD_LVER]], ptr @SUM, align 4
; CHECK-NEXT: ret void
;
@@ -127,11 +127,13 @@ for.end: ; preds = %for.body
ret void
}
;.
-; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
-; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
-; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
-; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
+; CHECK: [[LOOP0]] = distinct !{[[LOOP0]], [[META1:![0-9]+]]}
+; CHECK: [[META1]] = !{!"llvm.loop.isdistributed", i32 1}
+; CHECK: [[META2]] = !{[[META3:![0-9]+]]}
+; CHECK: [[META3]] = distinct !{[[META3]], [[META4:![0-9]+]]}
+; CHECK: [[META4]] = distinct !{[[META4]], i1 false, !"LVerDomain"}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
-; CHECK: [[META6]] = distinct !{[[META6]], [[META2]]}
+; CHECK: [[META6]] = distinct !{[[META6]], [[META4]]}
+; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
+; CHECK: [[META8]] = distinct !{[[META8]], [[META4]]}
;.
diff --git a/llvm/test/Transforms/LoopRotate/noalias.ll b/llvm/test/Transforms/LoopRotate/noalias.ll
index d6b2414b426d8..e765ff71aa2a3 100644
--- a/llvm/test/Transforms/LoopRotate/noalias.ll
+++ b/llvm/test/Transforms/LoopRotate/noalias.ll
@@ -155,13 +155,13 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!1 = !{!"clang"}
!2 = !{!3}
!3 = distinct !{!3, !4, !"test_loop_rotate_XX: pA"}
-!4 = distinct !{!4, !"test_loop_rotate_XX"}
+!4 = distinct !{!4, i1 false, !"test_loop_rotate_XX"}
; CHECK: !0 = !{i32 1, !"wchar_size", i32 4}
; CHECK: !1 = !{!"clang"}
; CHECK: !2 = !{!3}
; CHECK: !3 = distinct !{!3, !4, !"test_loop_rotate_XX: pA:pre.rot"}
-; CHECK: !4 = distinct !{!4, !"test_loop_rotate_XX"}
+; CHECK: !4 = distinct !{!4, i1 false, !"test_loop_rotate_XX"}
; CHECK: !5 = !{!6}
; CHECK: !6 = distinct !{!6, !4, !"test_loop_rotate_XX: pA"}
; CHECK: !7 = !{!8}
diff --git a/llvm/test/Transforms/LoopUnroll/noalias.ll b/llvm/test/Transforms/LoopUnroll/noalias.ll
index 4d2ed1d17fde0..9bab8fcd46e54 100644
--- a/llvm/test/Transforms/LoopUnroll/noalias.ll
+++ b/llvm/test/Transforms/LoopUnroll/noalias.ll
@@ -6,22 +6,22 @@ define void @test_inside(ptr %addr1, ptr %addr2) {
; CHECK-NEXT: start:
; CHECK-NEXT: br label [[BODY:%.*]]
; CHECK: body:
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !0)
-; CHECK-NEXT: [[X:%.*]] = load i32, ptr [[ADDR1:%.*]], align 4, !alias.scope !0
-; CHECK-NEXT: store i32 [[X]], ptr [[ADDR2:%.*]], align 4, !noalias !0
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
+; CHECK-NEXT: [[X:%.*]] = load i32, ptr [[ADDR1:%.*]], align 4, !alias.scope [[META0]]
+; CHECK-NEXT: store i32 [[X]], ptr [[ADDR2:%.*]], align 4, !noalias [[META0]]
; CHECK-NEXT: [[ADDR1I_1:%.*]] = getelementptr inbounds i32, ptr [[ADDR1]], i32 1
; CHECK-NEXT: [[ADDR2I_1:%.*]] = getelementptr inbounds i32, ptr [[ADDR2]], i32 1
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !3)
-; CHECK-NEXT: [[X_1:%.*]] = load i32, ptr [[ADDR1I_1]], align 4, !alias.scope !3
-; CHECK-NEXT: store i32 [[X_1]], ptr [[ADDR2I_1]], align 4, !noalias !3
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !5)
-; CHECK-NEXT: [[X_2:%.*]] = load i32, ptr [[ADDR1]], align 4, !alias.scope !5
-; CHECK-NEXT: store i32 [[X_2]], ptr [[ADDR2]], align 4, !noalias !5
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
+; CHECK-NEXT: [[X_1:%.*]] = load i32, ptr [[ADDR1I_1]], align 4, !alias.scope [[META3]]
+; CHECK-NEXT: store i32 [[X_1]], ptr [[ADDR2I_1]], align 4, !noalias [[META3]]
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META5:![0-9]+]])
+; CHECK-NEXT: [[X_2:%.*]] = load i32, ptr [[ADDR1]], align 4, !alias.scope [[META5]]
+; CHECK-NEXT: store i32 [[X_2]], ptr [[ADDR2]], align 4, !noalias [[META5]]
; CHECK-NEXT: [[ADDR1I_3:%.*]] = getelementptr inbounds i32, ptr [[ADDR1]], i32 1
; CHECK-NEXT: [[ADDR2I_3:%.*]] = getelementptr inbounds i32, ptr [[ADDR2]], i32 1
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !7)
-; CHECK-NEXT: [[X_3:%.*]] = load i32, ptr [[ADDR1I_3]], align 4, !alias.scope !7
-; CHECK-NEXT: store i32 [[X_3]], ptr [[ADDR2I_3]], align 4, !noalias !7
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META7:![0-9]+]])
+; CHECK-NEXT: [[X_3:%.*]] = load i32, ptr [[ADDR1I_3]], align 4, !alias.scope [[META7]]
+; CHECK-NEXT: store i32 [[X_3]], ptr [[ADDR2I_3]], align 4, !noalias [[META7]]
; CHECK-NEXT: ret void
;
start:
@@ -48,21 +48,21 @@ end:
define void @test_outside(ptr %addr1, ptr %addr2) {
; CHECK-LABEL: @test_outside(
; CHECK-NEXT: start:
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !0)
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0]])
; CHECK-NEXT: br label [[BODY:%.*]]
; CHECK: body:
-; CHECK-NEXT: [[X:%.*]] = load i32, ptr [[ADDR1:%.*]], align 4, !alias.scope !0
-; CHECK-NEXT: store i32 [[X]], ptr [[ADDR2:%.*]], align 4, !noalias !0
+; CHECK-NEXT: [[X:%.*]] = load i32, ptr [[ADDR1:%.*]], align 4, !alias.scope [[META0]]
+; CHECK-NEXT: store i32 [[X]], ptr [[ADDR2:%.*]], align 4, !noalias [[META0]]
; CHECK-NEXT: [[ADDR1I_1:%.*]] = getelementptr inbounds i32, ptr [[ADDR1]], i32 1
; CHECK-NEXT: [[ADDR2I_1:%.*]] = getelementptr inbounds i32, ptr [[ADDR2]], i32 1
-; CHECK-NEXT: [[X_1:%.*]] = load i32, ptr [[ADDR1I_1]], align 4, !alias.scope !0
-; CHECK-NEXT: store i32 [[X_1]], ptr [[ADDR2I_1]], align 4, !noalias !0
-; CHECK-NEXT: [[X_2:%.*]] = load i32, ptr [[ADDR1]], align 4, !alias.scope !0
-; CHECK-NEXT: store i32 [[X_2]], ptr [[ADDR2]], align 4, !noalias !0
+; CHECK-NEXT: [[X_1:%.*]] = load i32, ptr [[ADDR1I_1]], align 4, !alias.scope [[META0]]
+; CHECK-NEXT: store i32 [[X_1]], ptr [[ADDR2I_1]], align 4, !noalias [[META0]]
+; CHECK-NEXT: [[X_2:%.*]] = load i32, ptr [[ADDR1]], align 4, !alias.scope [[META0]]
+; CHECK-NEXT: store i32 [[X_2]], ptr [[ADDR2]], align 4, !noalias [[META0]]
; CHECK-NEXT: [[ADDR1I_3:%.*]] = getelementptr inbounds i32, ptr [[ADDR1]], i32 1
; CHECK-NEXT: [[ADDR2I_3:%.*]] = getelementptr inbounds i32, ptr [[ADDR2]], i32 1
-; CHECK-NEXT: [[X_3:%.*]] = load i32, ptr [[ADDR1I_3]], align 4, !alias.scope !0
-; CHECK-NEXT: store i32 [[X_3]], ptr [[ADDR2I_3]], align 4, !noalias !0
+; CHECK-NEXT: [[X_3:%.*]] = load i32, ptr [[ADDR1I_3]], align 4, !alias.scope [[META0]]
+; CHECK-NEXT: store i32 [[X_3]], ptr [[ADDR2I_3]], align 4, !noalias [[META0]]
; CHECK-NEXT: ret void
;
start:
@@ -88,13 +88,13 @@ end:
declare void @llvm.experimental.noalias.scope.decl(metadata)
-!0 = distinct !{!0}
+!0 = distinct !{!0, i1 false}
!1 = distinct !{!1, !0}
!2 = !{!1}
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2}
-; CHECK: !2 = distinct !{!2}
+; CHECK: !2 = distinct !{!2, i1 false}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"It1"}
; CHECK: !5 = !{!6}
diff --git a/llvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll b/llvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll
index 839bdbd541e4b..60355f740f8f3 100644
--- a/llvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll
+++ b/llvm/test/Transforms/LoopUnroll/peel-loop-noalias-scope-decl.ll
@@ -10,35 +10,35 @@ target triple = "x86_64-unknown-linux-gnu"
define internal fastcc void @test01(ptr %p0, ptr %p1, ptr %p2) unnamed_addr align 2 {
; CHECK-LABEL: @test01(
; CHECK-NEXT: for.body47.lr.ph:
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !0)
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META0:![0-9]+]])
; CHECK-NEXT: br label [[FOR_BODY47_PEEL_BEGIN:%.*]]
; CHECK: for.body47.peel.begin:
; CHECK-NEXT: br label [[FOR_BODY47_PEEL:%.*]]
; CHECK: for.body47.peel:
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !3)
-; CHECK-NEXT: store i8 42, ptr [[P0:%.*]], align 1, !alias.scope !3
-; CHECK-NEXT: store i8 43, ptr [[P1:%.*]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 44, ptr [[P2:%.*]], align 1, !alias.scope !5
-; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !noalias !3
-; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !noalias !5
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3:![0-9]+]])
+; CHECK-NEXT: store i8 42, ptr [[P0:%.*]], align 1, !alias.scope [[META3]]
+; CHECK-NEXT: store i8 43, ptr [[P1:%.*]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 44, ptr [[P2:%.*]], align 1, !alias.scope [[META5:![0-9]+]]
+; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !noalias [[META3]]
+; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !noalias [[META5]]
; CHECK-NEXT: [[CMP52_PEEL:%.*]] = icmp eq i32 0, 0
; CHECK-NEXT: br i1 [[CMP52_PEEL]], label [[COND_TRUE_PEEL:%.*]], label [[COND_END_PEEL:%.*]]
; CHECK: cond.true.peel:
-; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !alias.scope !3
-; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !alias.scope !5
-; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !noalias !3
-; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !noalias !5
+; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !alias.scope [[META3]]
+; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !alias.scope [[META5]]
+; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !noalias [[META3]]
+; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !noalias [[META5]]
; CHECK-NEXT: br label [[COND_END_PEEL]]
; CHECK: cond.end.peel:
-; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !alias.scope !3
-; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !alias.scope !5
-; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !noalias !3
-; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !noalias !5
+; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !alias.scope [[META3]]
+; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !alias.scope [[META5]]
+; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !noalias [[META3]]
+; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !noalias [[META5]]
; CHECK-NEXT: [[INC_PEEL:%.*]] = add nuw i32 0, 1
; CHECK-NEXT: [[EXITCOND_NOT_PEEL:%.*]] = icmp eq i32 [[INC_PEEL]], undef
; CHECK-NEXT: br i1 [[EXITCOND_NOT_PEEL]], label [[FOR_COND_CLEANUP46:%.*]], label [[FOR_BODY47_PEEL_NEXT:%.*]]
@@ -54,31 +54,31 @@ define internal fastcc void @test01(ptr %p0, ptr %p1, ptr %p2) unnamed_addr alig
; CHECK-NEXT: ret void
; CHECK: for.body47:
; CHECK-NEXT: [[J_02:%.*]] = phi i32 [ [[INC_PEEL]], [[FOR_BODY47_LR_PH_PEEL_NEWPH]] ], [ [[INC:%.*]], [[COND_END:%.*]] ]
-; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata !6)
-; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !alias.scope !6
-; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !alias.scope !8
-; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !noalias !6
-; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !noalias !8
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META6:![0-9]+]])
+; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !alias.scope [[META6]]
+; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !alias.scope [[META8:![0-9]+]]
+; CHECK-NEXT: store i8 42, ptr [[P0]], align 1, !noalias [[META6]]
+; CHECK-NEXT: store i8 43, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 44, ptr [[P2]], align 1, !noalias [[META8]]
; CHECK-NEXT: br i1 false, label [[COND_TRUE:%.*]], label [[COND_END]]
; CHECK: cond.true:
-; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !alias.scope !6
-; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !alias.scope !8
-; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !noalias !6
-; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !noalias !8
+; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !alias.scope [[META6]]
+; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !alias.scope [[META8]]
+; CHECK-NEXT: store i8 52, ptr [[P0]], align 1, !noalias [[META6]]
+; CHECK-NEXT: store i8 53, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 54, ptr [[P2]], align 1, !noalias [[META8]]
; CHECK-NEXT: br label [[COND_END]]
; CHECK: cond.end:
-; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !alias.scope !6
-; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !alias.scope !0
-; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !alias.scope !8
-; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !noalias !6
-; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !noalias !0
-; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !noalias !8
+; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !alias.scope [[META6]]
+; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !alias.scope [[META0]]
+; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !alias.scope [[META8]]
+; CHECK-NEXT: store i8 62, ptr [[P0]], align 1, !noalias [[META6]]
+; CHECK-NEXT: store i8 63, ptr [[P1]], align 1, !noalias [[META0]]
+; CHECK-NEXT: store i8 64, ptr [[P2]], align 1, !noalias [[META8]]
; CHECK-NEXT: [[INC]] = add nuw i32 [[J_02]], 1
-; CHECK-NEXT: br i1 undef, label [[FOR_COND_CLEANUP46_LOOPEXIT:%.*]], label [[FOR_BODY47]], [[LOOP9:!llvm.loop !.*]]
+; CHECK-NEXT: br i1 undef, label [[FOR_COND_CLEANUP46_LOOPEXIT:%.*]], label [[FOR_BODY47]], !llvm.loop [[LOOP9:![0-9]+]]
;
for.body47.lr.ph:
call void @llvm.experimental.noalias.scope.decl(metadata !5)
@@ -127,7 +127,7 @@ attributes #0 = { inaccessiblememonly nofree nosync nounwind willreturn }
!0 = !{!1}
!1 = distinct !{!1, !2, !"foo: %inner.result"}
-!2 = distinct !{!2, !"foo"}
+!2 = distinct !{!2, i1 false, !"foo"}
!3 = distinct !{!3, !4}
!4 = !{!"llvm.loop.mustprogress"}
!5 = !{!6}
@@ -136,7 +136,7 @@ attributes #0 = { inaccessiblememonly nofree nosync nounwind willreturn }
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2, !"foo: %outer.result"}
-; CHECK: !2 = distinct !{!2, !"foo"}
+; CHECK: !2 = distinct !{!2, i1 false, !"foo"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2, !"foo: %inner.result:Peel0"}
; CHECK: !5 = !{!4, !1}
diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/masked_ldst_sme.ll b/llvm/test/Transforms/LoopVectorize/AArch64/masked_ldst_sme.ll
index 6399878655ed1..034c0435e12d9 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/masked_ldst_sme.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/masked_ldst_sme.ll
@@ -167,7 +167,7 @@ attributes #0 = { uwtable vscale_range(1,16) "aarch64_pstate_sm_body" "target-fe
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[META5]] = !{[[META6:![0-9]+]], [[META1]], [[META7:![0-9]+]], [[META8:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll b/llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll
index 285e978a5b9a8..0bc5a3826d88c 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/predicated-costs.ll
@@ -520,7 +520,7 @@ exit:
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]], [[META8:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll b/llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
index 7ba5eb17bdc27..7acd0440d5c4b 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/store-costs-sve.ll
@@ -264,7 +264,7 @@ attributes #1 = { vscale_range(1,16) "target-features"="+sve" }
; DEFAULT: [[LOOP5]] = distinct !{[[LOOP5]], [[META2]], [[META1]]}
; DEFAULT: [[META6]] = !{[[META7:![0-9]+]]}
; DEFAULT: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; DEFAULT: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; DEFAULT: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; DEFAULT: [[META9]] = !{[[META10:![0-9]+]]}
; DEFAULT: [[META10]] = distinct !{[[META10]], [[META8]]}
; DEFAULT: [[LOOP11]] = distinct !{[[LOOP11]], [[META1]], [[META2]]}
@@ -277,7 +277,7 @@ attributes #1 = { vscale_range(1,16) "target-features"="+sve" }
; PRED: [[META2]] = !{!"llvm.loop.unroll.runtime.disable"}
; PRED: [[META3]] = !{[[META4:![0-9]+]]}
; PRED: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]]}
-; PRED: [[META5]] = distinct !{[[META5]], !"LVerDomain"}
+; PRED: [[META5]] = distinct !{[[META5]], i1 false, !"LVerDomain"}
; PRED: [[META6]] = !{[[META7:![0-9]+]]}
; PRED: [[META7]] = distinct !{[[META7]], [[META5]]}
; PRED: [[LOOP8]] = distinct !{[[LOOP8]], [[META1]], [[META2]]}
diff --git a/llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll b/llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
index f929e3b5d80a4..372b05d93d0bf 100644
--- a/llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
+++ b/llvm/test/Transforms/LoopVectorize/AArch64/sve2-histcnt.ll
@@ -865,9 +865,9 @@ attributes #0 = { "target-features"="+sve2" vscale_range(1,16) }
!5 = !{!"llvm.loop.interleave.count", i32 1}
!6 = !{!7}
!7 = distinct !{!7, !8, !"scope-index"}
-!8 = distinct !{!8, !"scopes-indices"}
+!8 = distinct !{!8, i1 false, !"scopes-indices"}
!9 = !{!10}
!10 = distinct !{!10, !8, !"scope-bucket"}
!11 = !{!10, !12}
!12 = distinct !{!12, !13, !"scope-bucket-2"}
-!13 = distinct !{!13, !"scopes-buckets"}
+!13 = distinct !{!13, i1 false, !"scopes-buckets"}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/blocks-with-dead-instructions.ll b/llvm/test/Transforms/LoopVectorize/RISCV/blocks-with-dead-instructions.ll
index 9fa4da804956b..13b700e5541ee 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/blocks-with-dead-instructions.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/blocks-with-dead-instructions.ll
@@ -553,7 +553,7 @@ attributes #0 = { "target-features"="+64bit,+v" vscale_range(2, 1024) }
; CHECK: [[LOOP9]] = distinct !{[[LOOP9]], [[META1]], [[META2]]}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]]}
-; CHECK: [[META12]] = distinct !{[[META12]], !"LVerDomain"}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false, !"LVerDomain"}
; CHECK: [[META13]] = !{[[META14:![0-9]+]], [[META15:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META12]]}
; CHECK: [[META15]] = distinct !{[[META15]], [[META12]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll b/llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
index 5d90cafc565c8..1ad545dce55f4 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/dead-ops-cost.ll
@@ -383,14 +383,14 @@ exit:
; CHECK: [[META2]] = !{!"llvm.loop.unroll.runtime.disable"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]]}
-; CHECK: [[META5]] = distinct !{[[META5]], !"LVerDomain"}
+; CHECK: [[META5]] = distinct !{[[META5]], i1 false, !"LVerDomain"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META5]]}
; CHECK: [[LOOP8]] = distinct !{[[LOOP8]], [[META1]], [[META2]]}
; CHECK: [[LOOP9]] = distinct !{[[LOOP9]], [[META1]]}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]]}
-; CHECK: [[META12]] = distinct !{[[META12]], !"LVerDomain"}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false, !"LVerDomain"}
; CHECK: [[META13]] = !{[[META14:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META12]]}
; CHECK: [[LOOP15]] = distinct !{[[LOOP15]], [[META1]], [[META2]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/induction-costs.ll b/llvm/test/Transforms/LoopVectorize/RISCV/induction-costs.ll
index aa5734371f0d5..965de36f6610f 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/induction-costs.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/induction-costs.ll
@@ -238,7 +238,7 @@ attributes #1 = { "target-cpu"="sifive-p670" vscale_range(2, 1024) }
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]], [[META5:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META2]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cast-intrinsics.ll b/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cast-intrinsics.ll
index 314ec3d7a51d0..60dba3d959d17 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cast-intrinsics.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-cast-intrinsics.ll
@@ -1260,7 +1260,7 @@ exit:
;.
; IF-EVL: [[META0]] = !{[[META1:![0-9]+]]}
; IF-EVL: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; IF-EVL: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; IF-EVL: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; IF-EVL: [[META3]] = !{[[META4:![0-9]+]]}
; IF-EVL: [[META4]] = distinct !{[[META4]], [[META2]]}
; IF-EVL: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]]}
@@ -1269,28 +1269,28 @@ exit:
; IF-EVL: [[LOOP8]] = distinct !{[[LOOP8]], [[META6]]}
; IF-EVL: [[META9]] = !{[[META10:![0-9]+]]}
; IF-EVL: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]]}
-; IF-EVL: [[META11]] = distinct !{[[META11]], !"LVerDomain"}
+; IF-EVL: [[META11]] = distinct !{[[META11]], i1 false, !"LVerDomain"}
; IF-EVL: [[META12]] = !{[[META13:![0-9]+]]}
; IF-EVL: [[META13]] = distinct !{[[META13]], [[META11]]}
; IF-EVL: [[LOOP14]] = distinct !{[[LOOP14]], [[META6]], [[META7]]}
; IF-EVL: [[LOOP15]] = distinct !{[[LOOP15]], [[META6]]}
; IF-EVL: [[META16]] = !{[[META17:![0-9]+]]}
; IF-EVL: [[META17]] = distinct !{[[META17]], [[META18:![0-9]+]]}
-; IF-EVL: [[META18]] = distinct !{[[META18]], !"LVerDomain"}
+; IF-EVL: [[META18]] = distinct !{[[META18]], i1 false, !"LVerDomain"}
; IF-EVL: [[META19]] = !{[[META20:![0-9]+]]}
; IF-EVL: [[META20]] = distinct !{[[META20]], [[META18]]}
; IF-EVL: [[LOOP21]] = distinct !{[[LOOP21]], [[META6]], [[META7]]}
; IF-EVL: [[LOOP22]] = distinct !{[[LOOP22]], [[META6]]}
; IF-EVL: [[META23]] = !{[[META24:![0-9]+]]}
; IF-EVL: [[META24]] = distinct !{[[META24]], [[META25:![0-9]+]]}
-; IF-EVL: [[META25]] = distinct !{[[META25]], !"LVerDomain"}
+; IF-EVL: [[META25]] = distinct !{[[META25]], i1 false, !"LVerDomain"}
; IF-EVL: [[META26]] = !{[[META27:![0-9]+]]}
; IF-EVL: [[META27]] = distinct !{[[META27]], [[META25]]}
; IF-EVL: [[LOOP28]] = distinct !{[[LOOP28]], [[META6]], [[META7]]}
; IF-EVL: [[LOOP29]] = distinct !{[[LOOP29]], [[META6]]}
; IF-EVL: [[META30]] = !{[[META31:![0-9]+]]}
; IF-EVL: [[META31]] = distinct !{[[META31]], [[META32:![0-9]+]]}
-; IF-EVL: [[META32]] = distinct !{[[META32]], !"LVerDomain"}
+; IF-EVL: [[META32]] = distinct !{[[META32]], i1 false, !"LVerDomain"}
; IF-EVL: [[META33]] = !{[[META34:![0-9]+]]}
; IF-EVL: [[META34]] = distinct !{[[META34]], [[META32]]}
; IF-EVL: [[LOOP35]] = distinct !{[[LOOP35]], [[META6]], [[META7]]}
@@ -1309,7 +1309,7 @@ exit:
;.
; NO-VP: [[META0]] = !{[[META1:![0-9]+]]}
; NO-VP: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; NO-VP: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; NO-VP: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; NO-VP: [[META3]] = !{[[META4:![0-9]+]]}
; NO-VP: [[META4]] = distinct !{[[META4]], [[META2]]}
; NO-VP: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]]}
@@ -1318,28 +1318,28 @@ exit:
; NO-VP: [[LOOP8]] = distinct !{[[LOOP8]], [[META6]]}
; NO-VP: [[META9]] = !{[[META10:![0-9]+]]}
; NO-VP: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]]}
-; NO-VP: [[META11]] = distinct !{[[META11]], !"LVerDomain"}
+; NO-VP: [[META11]] = distinct !{[[META11]], i1 false, !"LVerDomain"}
; NO-VP: [[META12]] = !{[[META13:![0-9]+]]}
; NO-VP: [[META13]] = distinct !{[[META13]], [[META11]]}
; NO-VP: [[LOOP14]] = distinct !{[[LOOP14]], [[META6]], [[META7]]}
; NO-VP: [[LOOP15]] = distinct !{[[LOOP15]], [[META6]]}
; NO-VP: [[META16]] = !{[[META17:![0-9]+]]}
; NO-VP: [[META17]] = distinct !{[[META17]], [[META18:![0-9]+]]}
-; NO-VP: [[META18]] = distinct !{[[META18]], !"LVerDomain"}
+; NO-VP: [[META18]] = distinct !{[[META18]], i1 false, !"LVerDomain"}
; NO-VP: [[META19]] = !{[[META20:![0-9]+]]}
; NO-VP: [[META20]] = distinct !{[[META20]], [[META18]]}
; NO-VP: [[LOOP21]] = distinct !{[[LOOP21]], [[META6]], [[META7]]}
; NO-VP: [[LOOP22]] = distinct !{[[LOOP22]], [[META6]]}
; NO-VP: [[META23]] = !{[[META24:![0-9]+]]}
; NO-VP: [[META24]] = distinct !{[[META24]], [[META25:![0-9]+]]}
-; NO-VP: [[META25]] = distinct !{[[META25]], !"LVerDomain"}
+; NO-VP: [[META25]] = distinct !{[[META25]], i1 false, !"LVerDomain"}
; NO-VP: [[META26]] = !{[[META27:![0-9]+]]}
; NO-VP: [[META27]] = distinct !{[[META27]], [[META25]]}
; NO-VP: [[LOOP28]] = distinct !{[[LOOP28]], [[META6]], [[META7]]}
; NO-VP: [[LOOP29]] = distinct !{[[LOOP29]], [[META6]]}
; NO-VP: [[META30]] = !{[[META31:![0-9]+]]}
; NO-VP: [[META31]] = distinct !{[[META31]], [[META32:![0-9]+]]}
-; NO-VP: [[META32]] = distinct !{[[META32]], !"LVerDomain"}
+; NO-VP: [[META32]] = distinct !{[[META32]], i1 false, !"LVerDomain"}
; NO-VP: [[META33]] = !{[[META34:![0-9]+]]}
; NO-VP: [[META34]] = distinct !{[[META34]], [[META32]]}
; NO-VP: [[LOOP35]] = distinct !{[[LOOP35]], [[META6]], [[META7]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-intermediate-store.ll b/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-intermediate-store.ll
index f24d7b4632eee..3c6a006dbe249 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-intermediate-store.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/tail-folding-intermediate-store.ll
@@ -236,7 +236,7 @@ for.end:
;.
; IF-EVL-OUTLOOP: [[META0]] = !{[[META1:![0-9]+]]}
; IF-EVL-OUTLOOP: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; IF-EVL-OUTLOOP: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; IF-EVL-OUTLOOP: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; IF-EVL-OUTLOOP: [[LOOP3]] = distinct !{[[LOOP3]], [[META4:![0-9]+]], [[META5:![0-9]+]]}
; IF-EVL-OUTLOOP: [[META4]] = !{!"llvm.loop.isvectorized", i32 1}
; IF-EVL-OUTLOOP: [[META5]] = !{!"llvm.loop.unroll.runtime.disable"}
@@ -246,7 +246,7 @@ for.end:
;.
; IF-EVL-INLOOP: [[META0]] = !{[[META1:![0-9]+]]}
; IF-EVL-INLOOP: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; IF-EVL-INLOOP: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; IF-EVL-INLOOP: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; IF-EVL-INLOOP: [[LOOP3]] = distinct !{[[LOOP3]], [[META4:![0-9]+]], [[META5:![0-9]+]]}
; IF-EVL-INLOOP: [[META4]] = !{!"llvm.loop.isvectorized", i32 1}
; IF-EVL-INLOOP: [[META5]] = !{!"llvm.loop.unroll.runtime.disable"}
@@ -256,7 +256,7 @@ for.end:
;.
; NO-VP-OUTLOOP: [[META0]] = !{[[META1:![0-9]+]]}
; NO-VP-OUTLOOP: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; NO-VP-OUTLOOP: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; NO-VP-OUTLOOP: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; NO-VP-OUTLOOP: [[LOOP3]] = distinct !{[[LOOP3]], [[META4:![0-9]+]], [[META5:![0-9]+]]}
; NO-VP-OUTLOOP: [[META4]] = !{!"llvm.loop.isvectorized", i32 1}
; NO-VP-OUTLOOP: [[META5]] = !{!"llvm.loop.unroll.runtime.disable"}
@@ -266,7 +266,7 @@ for.end:
;.
; NO-VP-INLOOP: [[META0]] = !{[[META1:![0-9]+]]}
; NO-VP-INLOOP: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; NO-VP-INLOOP: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; NO-VP-INLOOP: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; NO-VP-INLOOP: [[LOOP3]] = distinct !{[[LOOP3]], [[META4:![0-9]+]], [[META5:![0-9]+]]}
; NO-VP-INLOOP: [[META4]] = !{!"llvm.loop.isvectorized", i32 1}
; NO-VP-INLOOP: [[META5]] = !{!"llvm.loop.unroll.runtime.disable"}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll b/llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
index e7acfe9a4f4fc..0dec26322cbf7 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/truncate-to-minimal-bitwidth-cost.ll
@@ -358,7 +358,7 @@ attributes #1 = { "target-features"="+64bit,+v" }
; CHECK: [[LOOP5]] = distinct !{[[LOOP5]], [[META1]], [[META2]]}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; CHECK: [[META9]] = !{[[META10:![0-9]+]], [[META11:![0-9]+]]}
; CHECK: [[META10]] = distinct !{[[META10]], [[META8]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META8]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/type-info-cache-evl-crash.ll b/llvm/test/Transforms/LoopVectorize/RISCV/type-info-cache-evl-crash.ll
index a9c793406032e..fc8ccf602963a 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/type-info-cache-evl-crash.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/type-info-cache-evl-crash.ll
@@ -90,7 +90,7 @@ exit:
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/RISCV/vf-will-not-generate-any-vector-insts.ll b/llvm/test/Transforms/LoopVectorize/RISCV/vf-will-not-generate-any-vector-insts.ll
index dca4f47738309..b3ab395508d3b 100644
--- a/llvm/test/Transforms/LoopVectorize/RISCV/vf-will-not-generate-any-vector-insts.ll
+++ b/llvm/test/Transforms/LoopVectorize/RISCV/vf-will-not-generate-any-vector-insts.ll
@@ -62,7 +62,7 @@ exit:
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/AArch64/sve2-histcnt-vplan.ll b/llvm/test/Transforms/LoopVectorize/VPlan/AArch64/sve2-histcnt-vplan.ll
index bceb53bb131c8..66802690bdd7b 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/AArch64/sve2-histcnt-vplan.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/AArch64/sve2-histcnt-vplan.ll
@@ -155,6 +155,6 @@ for.exit:
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
!3 = !{!4}
!4 = distinct !{!4, !2}
diff --git a/llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll b/llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll
index aa5a0f5be24be..ed35fe4fbceb6 100644
--- a/llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll
+++ b/llvm/test/Transforms/LoopVectorize/X86/interleave-cost.ll
@@ -533,7 +533,7 @@ attributes #1 = { "min-legal-vector-width"="0" "target-cpu"="cascadelake" }
; CHECK: [[META2]] = !{!"llvm.loop.unroll.runtime.disable"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META5:![0-9]+]]}
-; CHECK: [[META5]] = distinct !{[[META5]], !"LVerDomain"}
+; CHECK: [[META5]] = distinct !{[[META5]], i1 false, !"LVerDomain"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META5]]}
; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/dead_instructions.ll b/llvm/test/Transforms/LoopVectorize/dead_instructions.ll
index ed50065a4e251..668700366bfc2 100644
--- a/llvm/test/Transforms/LoopVectorize/dead_instructions.ll
+++ b/llvm/test/Transforms/LoopVectorize/dead_instructions.ll
@@ -260,7 +260,7 @@ exit:
; CHECK: [[LOOP4]] = distinct !{[[LOOP4]], [[META1]], [[META2]]}
; CHECK: [[META5]] = !{[[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]]}
-; CHECK: [[META7]] = distinct !{[[META7]], !"LVerDomain"}
+; CHECK: [[META7]] = distinct !{[[META7]], i1 false, !"LVerDomain"}
; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
; CHECK: [[META9]] = distinct !{[[META9]], [[META7]]}
; CHECK: [[LOOP10]] = distinct !{[[LOOP10]], [[META1]], [[META2]]}
diff --git a/llvm/test/Transforms/LoopVectorize/interleaved-accesses-metadata.ll b/llvm/test/Transforms/LoopVectorize/interleaved-accesses-metadata.ll
index df243aea6bbde..5d561ebcf748c 100644
--- a/llvm/test/Transforms/LoopVectorize/interleaved-accesses-metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/interleaved-accesses-metadata.ll
@@ -259,7 +259,7 @@ exit:
; CHECK: [[META9]] = !{!"llvm.loop.unroll.runtime.disable"}
; CHECK: [[META10]] = !{[[META11:![0-9]+]]}
; CHECK: [[META11]] = distinct !{[[META11]], [[META12:![0-9]+]]}
-; CHECK: [[META12]] = distinct !{[[META12]], !"LVerDomain"}
+; CHECK: [[META12]] = distinct !{[[META12]], i1 false, !"LVerDomain"}
; CHECK: [[META13]] = !{[[META14:![0-9]+]]}
; CHECK: [[META14]] = distinct !{[[META14]], [[META12]]}
; CHECK: [[LOOP15]] = distinct !{[[LOOP15]], [[META8]], [[META9]]}
diff --git a/llvm/test/Transforms/LoopVectorize/metadata.ll b/llvm/test/Transforms/LoopVectorize/metadata.ll
index d0e21bb64caab..7fb8a5542bfef 100644
--- a/llvm/test/Transforms/LoopVectorize/metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/metadata.ll
@@ -631,7 +631,7 @@ attributes #1 = { nounwind "vector-function-abi-variant"="_ZGV_LLVM_N2v_bar(bar_
!3 = !{!7, !7, i64 0, i64 0}
!4 = !{!5}
!5 = distinct !{!5, !6, !"g1"}
-!6 = distinct !{!6, !"t2"}
+!6 = distinct !{!6, i11 false, !"t2"}
!7 = !{!"omnipotent char", !2}
;.
@@ -651,13 +651,13 @@ attributes #1 = { nounwind "vector-function-abi-variant"="_ZGV_LLVM_N2v_bar(bar_
; CHECK: [[LOOP13]] = distinct !{[[LOOP13]], [[META6]], [[META5]]}
; CHECK: [[META14]] = !{[[META15:![0-9]+]]}
; CHECK: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]]}
-; CHECK: [[META16]] = distinct !{[[META16]], !"LVerDomain"}
+; CHECK: [[META16]] = distinct !{[[META16]], i1 false, !"LVerDomain"}
; CHECK: [[LOOP17]] = distinct !{[[LOOP17]], [[META5]], [[META6]]}
; CHECK: [[META18]] = !{[[META19:![0-9]+]]}
; CHECK: [[META19]] = distinct !{[[META19]], [[META16]]}
; CHECK: [[META20]] = !{[[META21:![0-9]+]], [[META15]]}
; CHECK: [[META21]] = distinct !{[[META21]], [[META22:![0-9]+]], !"g1"}
-; CHECK: [[META22]] = distinct !{[[META22]], !"t2"}
+; CHECK: [[META22]] = distinct !{[[META22]], i1 false, !"t2"}
; CHECK: [[META23]] = !{[[META21]]}
; CHECK: [[LOOP24]] = distinct !{[[LOOP24]], [[META5]]}
;.
@@ -677,13 +677,13 @@ attributes #1 = { nounwind "vector-function-abi-variant"="_ZGV_LLVM_N2v_bar(bar_
; INTERLEAVE: [[LOOP13]] = distinct !{[[LOOP13]], [[META6]], [[META5]]}
; INTERLEAVE: [[META14]] = !{[[META15:![0-9]+]]}
; INTERLEAVE: [[META15]] = distinct !{[[META15]], [[META16:![0-9]+]]}
-; INTERLEAVE: [[META16]] = distinct !{[[META16]], !"LVerDomain"}
+; INTERLEAVE: [[META16]] = distinct !{[[META16]], i1 false, !"LVerDomain"}
; INTERLEAVE: [[LOOP17]] = distinct !{[[LOOP17]], [[META5]], [[META6]]}
; INTERLEAVE: [[META18]] = !{[[META19:![0-9]+]]}
; INTERLEAVE: [[META19]] = distinct !{[[META19]], [[META16]]}
; INTERLEAVE: [[META20]] = !{[[META21:![0-9]+]], [[META15]]}
; INTERLEAVE: [[META21]] = distinct !{[[META21]], [[META22:![0-9]+]], !"g1"}
-; INTERLEAVE: [[META22]] = distinct !{[[META22]], !"t2"}
+; INTERLEAVE: [[META22]] = distinct !{[[META22]], i1 false, !"t2"}
; INTERLEAVE: [[META23]] = !{[[META21]]}
; INTERLEAVE: [[LOOP24]] = distinct !{[[LOOP24]], [[META5]]}
;.
diff --git a/llvm/test/Transforms/LoopVectorize/noalias-md.ll b/llvm/test/Transforms/LoopVectorize/noalias-md.ll
index 93dd79f428e88..3196b9e414d6f 100644
--- a/llvm/test/Transforms/LoopVectorize/noalias-md.ll
+++ b/llvm/test/Transforms/LoopVectorize/noalias-md.ll
@@ -70,7 +70,7 @@ for.end:
; LV: !0 = !{!1}
; LV: !1 = distinct !{!1, !2}
-; LV: !2 = distinct !{!2, !"LVerDomain"}
+; LV: !2 = distinct !{!2, i1 false, !"LVerDomain"}
; LV: !3 = !{!4}
; LV: !4 = distinct !{!4, !2}
; LV: !5 = !{!1, !6}
diff --git a/llvm/test/Transforms/LoopVectorize/noalias-scope-decl-outer-loop.ll b/llvm/test/Transforms/LoopVectorize/noalias-scope-decl-outer-loop.ll
index efbfc49a21804..d3123e06d1150 100644
--- a/llvm/test/Transforms/LoopVectorize/noalias-scope-decl-outer-loop.ll
+++ b/llvm/test/Transforms/LoopVectorize/noalias-scope-decl-outer-loop.ll
@@ -69,4 +69,4 @@ exit:
!2 = !{!"llvm.loop.vectorize.enable"}
!3 = !{!4}
!4 = distinct !{!4, !5}
-!5 = distinct !{!5}
+!5 = distinct !{!5, i1 false}
diff --git a/llvm/test/Transforms/LoopVectorize/noalias-scope-decl.ll b/llvm/test/Transforms/LoopVectorize/noalias-scope-decl.ll
index 788732f84cda1..2f70c8d9abb8d 100644
--- a/llvm/test/Transforms/LoopVectorize/noalias-scope-decl.ll
+++ b/llvm/test/Transforms/LoopVectorize/noalias-scope-decl.ll
@@ -246,14 +246,14 @@ if.end5:
!0 = !{ !1 }
!1 = distinct !{ !1, !2 }
-!2 = distinct !{ !2 }
+!2 = distinct !{!2, i1 false}
!3 = distinct !{ !3, !2 }
!4 = !{ !3 }
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]]}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false}
; CHECK: [[LOOP3]] = distinct !{[[LOOP3]], [[META4:![0-9]+]], [[META5:![0-9]+]]}
; CHECK: [[META4]] = !{!"llvm.loop.isvectorized", i32 1}
; CHECK: [[META5]] = !{!"llvm.loop.unroll.runtime.disable"}
diff --git a/llvm/test/Transforms/LoopVectorize/predicate-switch.ll b/llvm/test/Transforms/LoopVectorize/predicate-switch.ll
index 3f3bb35956cee..985c6608f8a19 100644
--- a/llvm/test/Transforms/LoopVectorize/predicate-switch.ll
+++ b/llvm/test/Transforms/LoopVectorize/predicate-switch.ll
@@ -674,7 +674,7 @@ exit:
; IC1: [[LOOP5]] = distinct !{[[LOOP5]], [[META1]], [[META2]]}
; IC1: [[META6]] = !{[[META7:![0-9]+]]}
; IC1: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; IC1: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; IC1: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; IC1: [[LOOP9]] = distinct !{[[LOOP9]], [[META1]], [[META2]]}
; IC1: [[LOOP10]] = distinct !{[[LOOP10]], [[META1]]}
;.
@@ -686,7 +686,7 @@ exit:
; IC2: [[LOOP5]] = distinct !{[[LOOP5]], [[META1]], [[META2]]}
; IC2: [[META6]] = !{[[META7:![0-9]+]]}
; IC2: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; IC2: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; IC2: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; IC2: [[LOOP9]] = distinct !{[[LOOP9]], [[META1]], [[META2]]}
; IC2: [[LOOP10]] = distinct !{[[LOOP10]], [[META1]]}
;.
diff --git a/llvm/test/Transforms/LoopVectorize/replicate-region-branch-weights-merged-mem-ops.ll b/llvm/test/Transforms/LoopVectorize/replicate-region-branch-weights-merged-mem-ops.ll
index 74b42cecb554e..df534f6fa44a7 100644
--- a/llvm/test/Transforms/LoopVectorize/replicate-region-branch-weights-merged-mem-ops.ll
+++ b/llvm/test/Transforms/LoopVectorize/replicate-region-branch-weights-merged-mem-ops.ll
@@ -250,7 +250,7 @@ exit:
; CHECK: [[PROF0]] = !{!"branch_weights", i32 1, i32 127}
; CHECK: [[META1]] = !{[[META2:![0-9]+]]}
; CHECK: [[META2]] = distinct !{[[META2]], [[META3:![0-9]+]]}
-; CHECK: [[META3]] = distinct !{[[META3]], !"LVerDomain"}
+; CHECK: [[META3]] = distinct !{[[META3]], i1 false, !"LVerDomain"}
; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
; CHECK: [[META5]] = distinct !{[[META5]], [[META3]]}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
@@ -268,7 +268,7 @@ exit:
; CHECK: [[META18]] = !{!"llvm.loop.estimated_trip_count", i32 0}
; CHECK: [[META19]] = !{[[META20:![0-9]+]]}
; CHECK: [[META20]] = distinct !{[[META20]], [[META21:![0-9]+]]}
-; CHECK: [[META21]] = distinct !{[[META21]], !"LVerDomain"}
+; CHECK: [[META21]] = distinct !{[[META21]], i1 false, !"LVerDomain"}
; CHECK: [[META22]] = !{[[META23:![0-9]+]]}
; CHECK: [[META23]] = distinct !{[[META23]], [[META21]]}
; CHECK: [[META24]] = !{[[META25:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/runtime-check-threshold-with-force-metadata.ll b/llvm/test/Transforms/LoopVectorize/runtime-check-threshold-with-force-metadata.ll
index d4854fbcf9c75..b642ede6cbc7d 100644
--- a/llvm/test/Transforms/LoopVectorize/runtime-check-threshold-with-force-metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/runtime-check-threshold-with-force-metadata.ll
@@ -88,7 +88,7 @@ exit:
;.
; LIMIT1: [[META0]] = !{[[META1:![0-9]+]]}
; LIMIT1: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; LIMIT1: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; LIMIT1: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; LIMIT1: [[META3]] = !{[[META4:![0-9]+]]}
; LIMIT1: [[META4]] = distinct !{[[META4]], [[META2]]}
; LIMIT1: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]]}
diff --git a/llvm/test/Transforms/LoopVectorize/scalable-noalias-scope-decl.ll b/llvm/test/Transforms/LoopVectorize/scalable-noalias-scope-decl.ll
index 9457561072a2a..1be2a03eaa380 100644
--- a/llvm/test/Transforms/LoopVectorize/scalable-noalias-scope-decl.ll
+++ b/llvm/test/Transforms/LoopVectorize/scalable-noalias-scope-decl.ll
@@ -113,12 +113,12 @@ for.cond.cleanup:
!0 = !{ !1 }
!1 = distinct !{ !1, !2 }
-!2 = distinct !{ !2 }
+!2 = distinct !{ !2, i1 false }
!3 = distinct !{ !3, !2 }
!4 = !{ !3 }
; CHECK: [[SCOPE0_LIST]] = !{[[SCOPE0:!.*]]}
; CHECK: [[SCOPE0]] = distinct !{[[SCOPE0]], [[SCOPE0_DOM:!.*]]}
-; CHECK: [[SCOPE0_DOM]] = distinct !{[[SCOPE0_DOM]]}
+; CHECK: [[SCOPE0_DOM]] = distinct !{[[SCOPE0_DOM]], i1 false}
; CHECK: [[SCOPE4_LIST]] = !{[[SCOPE4:!.*]]}
; CHECK: [[SCOPE4]] = distinct !{[[SCOPE4]], [[SCOPE0_DOM]]}
diff --git a/llvm/test/Transforms/LoopVectorize/select-cmp-multiuse.ll b/llvm/test/Transforms/LoopVectorize/select-cmp-multiuse.ll
index 0c810c26760ba..1d75c47673588 100644
--- a/llvm/test/Transforms/LoopVectorize/select-cmp-multiuse.ll
+++ b/llvm/test/Transforms/LoopVectorize/select-cmp-multiuse.ll
@@ -1646,7 +1646,7 @@ exit:
; CHECK-VF4-IC1: [[LOOP5]] = distinct !{[[LOOP5]], [[META2]], [[META1]]}
; CHECK-VF4-IC1: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK-VF4-IC1: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK-VF4-IC1: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; CHECK-VF4-IC1: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; CHECK-VF4-IC1: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK-VF4-IC1: [[META10]] = distinct !{[[META10]], [[META8]]}
; CHECK-VF4-IC1: [[LOOP11]] = distinct !{[[LOOP11]], [[META1]], [[META2]]}
@@ -1662,7 +1662,7 @@ exit:
; CHECK-VF4-IC2: [[LOOP5]] = distinct !{[[LOOP5]], [[META2]], [[META1]]}
; CHECK-VF4-IC2: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK-VF4-IC2: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK-VF4-IC2: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; CHECK-VF4-IC2: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; CHECK-VF4-IC2: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK-VF4-IC2: [[META10]] = distinct !{[[META10]], [[META8]]}
; CHECK-VF4-IC2: [[LOOP11]] = distinct !{[[LOOP11]], [[META1]], [[META2]]}
@@ -1678,7 +1678,7 @@ exit:
; CHECK-VF1-IC2: [[LOOP5]] = distinct !{[[LOOP5]], [[META1]]}
; CHECK-VF1-IC2: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK-VF1-IC2: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK-VF1-IC2: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; CHECK-VF1-IC2: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; CHECK-VF1-IC2: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK-VF1-IC2: [[META10]] = distinct !{[[META10]], [[META8]]}
; CHECK-VF1-IC2: [[LOOP11]] = distinct !{[[LOOP11]], [[META1]], [[META2]]}
diff --git a/llvm/test/Transforms/LoopVectorize/unroll-novec-memcheck-metadata.ll b/llvm/test/Transforms/LoopVectorize/unroll-novec-memcheck-metadata.ll
index 67948a3882c01..83a716877d129 100644
--- a/llvm/test/Transforms/LoopVectorize/unroll-novec-memcheck-metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/unroll-novec-memcheck-metadata.ll
@@ -11,7 +11,7 @@ target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"
; CHECK-LABEL: middle.block:
; CHECK-DAG: ![[$MD1]] = !{![[MD2:[0-9]+]]}
; CHECK-DAG: ![[MD2]] = distinct !{![[MD2]], ![[MD3:[0-9]+]]}
-; CHECK-DAG: ![[MD3]] = distinct !{![[MD3]], !"LVerDomain"}
+; CHECK-DAG: ![[MD3]] = distinct !{![[MD3]], i1 false, !"LVerDomain"}
define void @test(ptr nocapture readonly %a, ptr nocapture %b) {
entry:
diff --git a/llvm/test/Transforms/LoopVersioning/add-phi-update-users.ll b/llvm/test/Transforms/LoopVersioning/add-phi-update-users.ll
index de72c3479a294..4fc181ad6a2cf 100644
--- a/llvm/test/Transforms/LoopVersioning/add-phi-update-users.ll
+++ b/llvm/test/Transforms/LoopVersioning/add-phi-update-users.ll
@@ -50,13 +50,13 @@ define void @f1() {
; CHECK-NEXT: [[CMP:%.*]] = icmp ult i64 [[INC]], 3
; CHECK-NEXT: br i1 [[CMP]], label %[[FOR_BODY]], label %[[FOR_END_LOOPEXIT1:.*]]
; CHECK: [[FOR_END_LOOPEXIT]]:
-; CHECK-NEXT: [[T2_LVER_PH:%.*]] = phi i16 [ [[T2_LVER_ORIG]], %[[FOR_BODY_LVER_ORIG]] ]
+; CHECK-NEXT: [[T2_LCSSA_PH:%.*]] = phi i16 [ [[T2_LVER_ORIG]], %[[FOR_BODY_LVER_ORIG]] ]
; CHECK-NEXT: br label %[[FOR_END:.*]]
; CHECK: [[FOR_END_LOOPEXIT1]]:
-; CHECK-NEXT: [[T2_LVER_PH2:%.*]] = phi i16 [ [[T2]], %[[FOR_BODY]] ]
+; CHECK-NEXT: [[T2_LCSSA_PH2:%.*]] = phi i16 [ [[T2]], %[[FOR_BODY]] ]
; CHECK-NEXT: br label %[[FOR_END]]
; CHECK: [[FOR_END]]:
-; CHECK-NEXT: [[T2_LVER:%.*]] = phi i16 [ [[T2_LVER_PH]], %[[FOR_END_LOOPEXIT]] ], [ [[T2_LVER_PH2]], %[[FOR_END_LOOPEXIT1]] ]
+; CHECK-NEXT: [[T2_LVER:%.*]] = phi i16 [ [[T2_LCSSA_PH]], %[[FOR_END_LOOPEXIT]] ], [ [[T2_LCSSA_PH2]], %[[FOR_END_LOOPEXIT1]] ]
; CHECK-NEXT: [[TOBOOL:%.*]] = icmp eq i16 [[T2_LVER]], 0
; CHECK-NEXT: br i1 [[TOBOOL]], label %[[FOR_COND_BACKEDGE:.*]], label %[[IF_THEN:.*]]
; CHECK: [[FOR_COND_BACKEDGE]]:
@@ -108,7 +108,7 @@ if.then: ; preds = %for.end
; CHECK: [[META5]] = !{!"Simple C/C++ TBAA"}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK: [[META8]] = distinct !{[[META8]], !"LVerDomain"}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false, !"LVerDomain"}
; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK: [[META10]] = distinct !{[[META10]], [[META8]]}
;.
diff --git a/llvm/test/Transforms/LoopVersioning/crash-36998.ll b/llvm/test/Transforms/LoopVersioning/crash-36998.ll
index 1217d9405e9f8..1ca1a2aff0706 100644
--- a/llvm/test/Transforms/LoopVersioning/crash-36998.ll
+++ b/llvm/test/Transforms/LoopVersioning/crash-36998.ll
@@ -58,7 +58,7 @@ for.cond.for.end_crit_edge: ; preds = %for.body
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
;.
diff --git a/llvm/test/Transforms/LoopVersioning/noalias-version-twice.ll b/llvm/test/Transforms/LoopVersioning/noalias-version-twice.ll
index 8a639166d41e4..0651ade738256 100644
--- a/llvm/test/Transforms/LoopVersioning/noalias-version-twice.ll
+++ b/llvm/test/Transforms/LoopVersioning/noalias-version-twice.ll
@@ -92,7 +92,7 @@ for.end: ; preds = %for.body
; Domain for the second loop versioning for the top loop after
; distribution.
-; CHECK: !17 = distinct !{!17, !"LVerDomain"}
+; CHECK: !17 = distinct !{!17, i1 false, !"LVerDomain"}
; CHECK: !19 = distinct !{!19, !17}
; CHECK: !20 = distinct !{!20, !17}
; CHECK: !21 = distinct !{!21, !17}
@@ -102,7 +102,7 @@ for.end: ; preds = %for.body
; CHECK: !34 = distinct !{!34, !35}
; Domain for the second loop versioning for the bottom loop after
; distribution.
-; CHECK: !35 = distinct !{!35, !"LVerDomain"}
+; CHECK: !35 = distinct !{!35, i1 false, !"LVerDomain"}
; CHECK: !36 = !{!21, !37}
; CHECK: !37 = distinct !{!37, !35}
; CHECK: !38 = !{!19, !39}
diff --git a/llvm/test/Transforms/LoopVersioning/noalias.ll b/llvm/test/Transforms/LoopVersioning/noalias.ll
index fd886eafa83ee..c95f97c864e85 100644
--- a/llvm/test/Transforms/LoopVersioning/noalias.ll
+++ b/llvm/test/Transforms/LoopVersioning/noalias.ll
@@ -46,7 +46,7 @@ for.end: ; preds = %for.body
}
; CHECK: !0 = !{!1}
; CHECK: !1 = distinct !{!1, !2}
-; CHECK: !2 = distinct !{!2, !"LVerDomain"}
+; CHECK: !2 = distinct !{!2, i1 false, !"LVerDomain"}
; CHECK: !3 = !{!4}
; CHECK: !4 = distinct !{!4, !2}
; CHECK: !5 = !{!6}
diff --git a/llvm/test/Transforms/LoopVersioning/wrapping-pointer-non-integral-addrspace.ll b/llvm/test/Transforms/LoopVersioning/wrapping-pointer-non-integral-addrspace.ll
index e3cb3831d7938..b856e42f09116 100644
--- a/llvm/test/Transforms/LoopVersioning/wrapping-pointer-non-integral-addrspace.ll
+++ b/llvm/test/Transforms/LoopVersioning/wrapping-pointer-non-integral-addrspace.ll
@@ -98,7 +98,7 @@ exit:
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
;.
diff --git a/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll b/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
index 6e3e23dbbc4fc..da55805608e14 100644
--- a/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
+++ b/llvm/test/Transforms/LowerInvoke/lowerinvoke.ll
@@ -44,4 +44,4 @@ lpad:
!0 = !{!"branch_weights", i32 100, i32 1}
!1 = !{!2}
!2 = distinct !{!2, !3}
-!3 = distinct !{!3}
+!3 = distinct !{!3, i1 false}
diff --git a/llvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll b/llvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll
index 1b997e8c4f884..183417f38d21f 100644
--- a/llvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll
+++ b/llvm/test/Transforms/MemCpyOpt/aa-recursion-assertion-failure.ll
@@ -83,4 +83,4 @@ if.end5: ; preds = %if.then3, %_Z1dPcS_
!0 = !{!1}
!1 = distinct !{!1, !2, !"_Z1dPcS_l: %h"}
-!2 = distinct !{!2, !"_Z1dPcS_l"}
+!2 = distinct !{!2, i1 false, !"_Z1dPcS_l"}
diff --git a/llvm/test/Transforms/MemCpyOpt/callslot_aa.ll b/llvm/test/Transforms/MemCpyOpt/callslot_aa.ll
index 410e16f72f748..f1b2fb601a8fb 100644
--- a/llvm/test/Transforms/MemCpyOpt/callslot_aa.ll
+++ b/llvm/test/Transforms/MemCpyOpt/callslot_aa.ll
@@ -23,6 +23,6 @@ declare void @llvm.memcpy.p0.p0.i64(ptr, ptr, i64, i1)
; Check that the noalias for "dst" was removed by checking that the metadata is gone
; CHECK-NOT: "dst"
-!0 = !{!0}
+!0 = !{!0, i1 false}
!1 = distinct !{!1, !0, !"dst"}
!2 = distinct !{!1}
diff --git a/llvm/test/Transforms/MemCpyOpt/callslot_badaa.ll b/llvm/test/Transforms/MemCpyOpt/callslot_badaa.ll
index a0c0e9f5ba78a..205f3a1e7b21e 100644
--- a/llvm/test/Transforms/MemCpyOpt/callslot_badaa.ll
+++ b/llvm/test/Transforms/MemCpyOpt/callslot_badaa.ll
@@ -36,7 +36,7 @@ declare void @llvm.memcpy.p0.p0.i64(ptr, ptr, i64, i1)
!0 = !{!1}
!1 = distinct !{!1, !2, !"callee0: %a"}
-!2 = distinct !{!2, !"callee0"}
+!2 = distinct !{!2, i1 false, !"callee0"}
!3 = !{!4}
!4 = distinct !{!4, !5, !"callee1: %a"}
-!5 = distinct !{!5, !"callee1"}
+!5 = distinct !{!5, i1 false, !"callee1"}
diff --git a/llvm/test/Transforms/MemCpyOpt/callslot_noalias.ll b/llvm/test/Transforms/MemCpyOpt/callslot_noalias.ll
index 9948d3dacad5f..aa41e5c3f1805 100644
--- a/llvm/test/Transforms/MemCpyOpt/callslot_noalias.ll
+++ b/llvm/test/Transforms/MemCpyOpt/callslot_noalias.ll
@@ -22,5 +22,5 @@ define i8 @test(ptr writable dereferenceable(1) noalias %dst) {
!0 = !{!1}
!1 = !{!1, !2}
-!2 = !{!2}
+!2 = !{!2, i1 false}
diff --git a/llvm/test/Transforms/MemCpyOpt/load-store-to-memcpy.ll b/llvm/test/Transforms/MemCpyOpt/load-store-to-memcpy.ll
index a344cce58a5b9..e991affad4c9e 100644
--- a/llvm/test/Transforms/MemCpyOpt/load-store-to-memcpy.ll
+++ b/llvm/test/Transforms/MemCpyOpt/load-store-to-memcpy.ll
@@ -43,10 +43,10 @@ define void @test_memcpy_constant(ptr %d) {
; memcpy(%d, %a) should not be generated since store2 may-aliases load %a.
define void @f(ptr %a, ptr %b, ptr %c, ptr %d) {
; CHECK-LABEL: @f(
-; CHECK-NEXT: [[VAL:%.*]] = load [[T:%.*]], ptr [[A:%.*]], align 4, !alias.scope !0
-; CHECK-NEXT: store [[T]] { i8 23, i32 23 }, ptr [[B:%.*]], align 4, !alias.scope !3
-; CHECK-NEXT: store [[T]] { i8 44, i32 44 }, ptr [[C:%.*]], align 4, !alias.scope !6, !noalias !3
-; CHECK-NEXT: store [[T]] [[VAL]], ptr [[D:%.*]], align 4, !alias.scope !9, !noalias !12
+; CHECK-NEXT: [[VAL:%.*]] = load [[T:%.*]], ptr [[A:%.*]], align 4, !alias.scope [[META0:![0-9]+]]
+; CHECK-NEXT: store [[T]] { i8 23, i32 23 }, ptr [[B:%.*]], align 4, !alias.scope [[META3:![0-9]+]]
+; CHECK-NEXT: store [[T]] { i8 44, i32 44 }, ptr [[C:%.*]], align 4, !alias.scope [[META6:![0-9]+]], !noalias [[META3]]
+; CHECK-NEXT: store [[T]] [[VAL]], ptr [[D:%.*]], align 4, !alias.scope [[META9:![0-9]+]], !noalias [[META12:![0-9]+]]
; CHECK-NEXT: ret void
;
%val = load %T, ptr %a, !alias.scope !{!10}
@@ -62,10 +62,10 @@ define void @f(ptr %a, ptr %b, ptr %c, ptr %d) {
ret void
}
-!0 = !{!0}
-!1 = !{!1}
-!2 = !{!2}
-!3 = !{!3}
+!0 = !{!0, i1 false}
+!1 = !{!1, i1 false}
+!2 = !{!2, i1 false}
+!3 = !{!3, i1 false}
!10 = !{ !10, !0 }
!11 = !{ !11, !1 }
diff --git a/llvm/test/Transforms/MemCpyOpt/memcpy.ll b/llvm/test/Transforms/MemCpyOpt/memcpy.ll
index ff006a08490c8..64b3f2a50ba40 100644
--- a/llvm/test/Transforms/MemCpyOpt/memcpy.ll
+++ b/llvm/test/Transforms/MemCpyOpt/memcpy.ll
@@ -945,7 +945,7 @@ define void @prevent_memsetting_a_undef_store(ptr %result) {
-!0 = !{!0}
+!0 = !{!0, i1 false}
!1 = !{!1, !0}
!2 = !{!1}
!3 = !{!4}
diff --git a/llvm/test/Transforms/MemCpyOpt/stack-move.ll b/llvm/test/Transforms/MemCpyOpt/stack-move.ll
index cf91ea98b2a55..83cec35262c95 100644
--- a/llvm/test/Transforms/MemCpyOpt/stack-move.ll
+++ b/llvm/test/Transforms/MemCpyOpt/stack-move.ll
@@ -246,7 +246,7 @@ define void @alias_no_mod() {
}
; Scope domain
-!0 = !{!0}
+!0 = !{!0, i1 false}
; Scope in that domain
!1 = !{!1, !0}
; Scope list
diff --git a/llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll b/llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll
index 544bba4909ea1..b68dbe43f9d9d 100644
--- a/llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll
+++ b/llvm/test/Transforms/MergeFunc/mergefunc-preserve-nonnull.ll
@@ -73,10 +73,10 @@ define void @noalias_2(ptr %0, ptr %1) {
!0 = !{}
!1 = !{}
-!2 = !{!2}
+!2 = !{!2, i1 false}
!3 = !{!3, !2}
!4 = !{!3}
-!5 = !{!5}
+!5 = !{!5, i1 false}
!6 = !{!6, !5}
!7 = !{!6}
!8 = !DILocation(line: 1, column: 1, scope: !{})
diff --git a/llvm/test/Transforms/MergedLoadStoreMotion/preserve-store-metadata.ll b/llvm/test/Transforms/MergedLoadStoreMotion/preserve-store-metadata.ll
index 00cdc487eaba1..9284d1814a29d 100644
--- a/llvm/test/Transforms/MergedLoadStoreMotion/preserve-store-metadata.ll
+++ b/llvm/test/Transforms/MergedLoadStoreMotion/preserve-store-metadata.ll
@@ -88,7 +88,7 @@ return:
!8 = !{!"any pointer", !2, i64 0}
!9 = !{!10}
!10 = distinct !{!10, !11}
-!11 = distinct !{!11}
+!11 = distinct !{!11, i1 false}
!12 = distinct !{!10}
!13 = distinct !{}
!14 = distinct !{}
@@ -101,7 +101,7 @@ return:
; CHECK: [[META5]] = !{!"long", [[META2]]}
; CHECK: [[META6]] = !{[[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], [[META8:![0-9]+]]}
-; CHECK: [[META8]] = distinct !{[[META8]]}
+; CHECK: [[META8]] = distinct !{[[META8]], i1 false}
; CHECK: [[ACC_GRP9]] = distinct !{}
; CHECK: [[_FOOPTR_TBAA10]] = !{[[META11:![0-9]+]], [[META11]], i64 0, i64 0}
; CHECK: [[META11]] = !{!"p2 _Foo", [[META12:![0-9]+]]}
diff --git a/llvm/test/Transforms/NewGVN/noalias.ll b/llvm/test/Transforms/NewGVN/noalias.ll
index a4fc3d1eb16e1..0009a1ff9a2c6 100644
--- a/llvm/test/Transforms/NewGVN/noalias.ll
+++ b/llvm/test/Transforms/NewGVN/noalias.ll
@@ -44,7 +44,7 @@ declare i32 @foo(ptr) readonly
!0 = distinct !{!0, !2, !"callee0: %a"}
!1 = distinct !{!1, !2, !"callee0: %b"}
-!2 = distinct !{!2, !"callee0"}
+!2 = distinct !{!2, i1 false, !"callee0"}
!3 = !{!0}
!4 = !{!1}
@@ -52,7 +52,7 @@ declare i32 @foo(ptr) readonly
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"callee0: %a"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"callee0"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"callee0"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]], !"callee0: %b"}
;.
diff --git a/llvm/test/Transforms/OpenMP/spmdization_guarding.ll b/llvm/test/Transforms/OpenMP/spmdization_guarding.ll
index a91a3816714ce..c8a1bfa96efc1 100644
--- a/llvm/test/Transforms/OpenMP/spmdization_guarding.ll
+++ b/llvm/test/Transforms/OpenMP/spmdization_guarding.ll
@@ -429,7 +429,7 @@ attributes #5 = { convergent nounwind "llvm.assume"="omp_no_openmp,ompx_spmd_ame
!7 = !{!"clang version 14.0.0"}
!8 = !{!9}
!9 = distinct !{!9, !10, !"__omp_outlined__: %__context"}
-!10 = distinct !{!10, !"__omp_outlined__"}
+!10 = distinct !{!10, i1 false, !"__omp_outlined__"}
!11 = distinct !{!11, !12}
!12 = !{!"llvm.loop.mustprogress"}
;.
@@ -466,7 +466,7 @@ attributes #5 = { convergent nounwind "llvm.assume"="omp_no_openmp,ompx_spmd_ame
; CHECK: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
; CHECK: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]], !"__omp_outlined__: %__context"}
-; CHECK: [[META9]] = distinct !{[[META9]], !"__omp_outlined__"}
+; CHECK: [[META9]] = distinct !{[[META9]], i1 false, !"__omp_outlined__"}
; CHECK: [[LOOP10]] = distinct !{[[LOOP10]], [[META11:![0-9]+]]}
; CHECK: [[META11]] = !{!"llvm.loop.mustprogress"}
;.
@@ -479,7 +479,7 @@ attributes #5 = { convergent nounwind "llvm.assume"="omp_no_openmp,ompx_spmd_ame
; CHECK-DISABLED: [[META6:![0-9]+]] = !{!"{{.*}}clang version {{.*}}"}
; CHECK-DISABLED: [[META7]] = !{[[META8:![0-9]+]]}
; CHECK-DISABLED: [[META8]] = distinct !{[[META8]], [[META9:![0-9]+]], !"__omp_outlined__: %__context"}
-; CHECK-DISABLED: [[META9]] = distinct !{[[META9]], !"__omp_outlined__"}
+; CHECK-DISABLED: [[META9]] = distinct !{[[META9]], i1 false, !"__omp_outlined__"}
; CHECK-DISABLED: [[LOOP10]] = distinct !{[[LOOP10]], [[META11:![0-9]+]]}
; CHECK-DISABLED: [[META11]] = !{!"llvm.loop.mustprogress"}
;.
diff --git a/llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll b/llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll
index f338bec08be6d..3e207c17855a2 100644
--- a/llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll
+++ b/llvm/test/Transforms/PhaseOrdering/AArch64/indvars-vectorization.ll
@@ -119,7 +119,7 @@ for.end:
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]], !"LVerDomain"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"LVerDomain"}
; CHECK: [[META3]] = !{[[META4:![0-9]+]]}
; CHECK: [[META4]] = distinct !{[[META4]], [[META2]]}
; CHECK: [[LOOP5]] = distinct !{[[LOOP5]], [[META6:![0-9]+]], [[META7:![0-9]+]], [[META8:![0-9]+]]}
diff --git a/llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll b/llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll
index 96a7e2d4c52b3..dc396a409e3b2 100644
--- a/llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll
+++ b/llvm/test/Transforms/PhaseOrdering/X86/loop-vectorizer-noalias.ll
@@ -72,5 +72,5 @@ attributes #0 = { "target-features"="+cmov,+cx8,+fxsr,+mmx,+sse,+sse2,+x87"}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"acc: %val"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"acc"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"acc"}
;.
diff --git a/llvm/test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll b/llvm/test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll
index 02bf2906fb712..6dd33505a4726 100644
--- a/llvm/test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll
+++ b/llvm/test/Transforms/RewriteStatepointsForGC/drop-invalid-metadata.ll
@@ -133,7 +133,7 @@ attributes #0 = { nounwind readonly }
!0 = !{i32 0, i32 2147483647}
!1 = !{}
!2 = !{i32 10, i32 1}
-!3 = !{!3}
+!3 = !{!3, i1 false}
!4 = !{!4, !3}
!5 = !{!4}
!6 = !{i64 8}
diff --git a/llvm/test/Transforms/SLPVectorizer/X86/gathered-shuffle-resized.ll b/llvm/test/Transforms/SLPVectorizer/X86/gathered-shuffle-resized.ll
index 6df57f8c6a0bb..396fd161aa888 100644
--- a/llvm/test/Transforms/SLPVectorizer/X86/gathered-shuffle-resized.ll
+++ b/llvm/test/Transforms/SLPVectorizer/X86/gathered-shuffle-resized.ll
@@ -174,9 +174,9 @@ bb:
!0 = !{!1}
!1 = !{!"result slice: {}", !2}
-!2 = !{!"fn AA domain"}
+!2 = !{!"fn AA domain", i1 false}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = !{!"result slice: {}", [[META2:![0-9]+]]}
-; CHECK: [[META2]] = !{!"fn AA domain"}
+; CHECK: [[META2]] = !{!"fn AA domain", i1 false}
;.
diff --git a/llvm/test/Transforms/SROA/mem-par-metadata-sroa.ll b/llvm/test/Transforms/SROA/mem-par-metadata-sroa.ll
index dec130bd533d6..d381449319590 100644
--- a/llvm/test/Transforms/SROA/mem-par-metadata-sroa.ll
+++ b/llvm/test/Transforms/SROA/mem-par-metadata-sroa.ll
@@ -116,7 +116,7 @@ declare void @llvm.memcpy.p0.p0.i64(ptr nocapture writeonly, ptr nocapture reado
!2 = !{!"llvm.loop.vectorize.enable"}
!3 = !{!4}
!4 = distinct !{!4, !5, !"_ZNK7ComplexplERKS_: %agg.result"}
-!5 = distinct !{!5, !"_ZNK7ComplexplERKS_"}
+!5 = distinct !{!5, i1 false, !"_ZNK7ComplexplERKS_"}
!11 = distinct !{}
;; NOTE: These prefixes are unused and the list is autogenerated. Do not add tests below this line:
; CHECK-MODIFY-CFG: {{.*}}
diff --git a/llvm/test/Transforms/Util/combine-alias-scope-metadata.ll b/llvm/test/Transforms/Util/combine-alias-scope-metadata.ll
index 1e8e8b516567e..70484b65f8c97 100644
--- a/llvm/test/Transforms/Util/combine-alias-scope-metadata.ll
+++ b/llvm/test/Transforms/Util/combine-alias-scope-metadata.ll
@@ -15,7 +15,7 @@ define void @test(ptr noalias dereferenceable(1) %in, ptr noalias dereferenceabl
declare void @llvm.memcpy.p0.p0.i64(ptr, ptr, i64, i1)
-!0 = !{!0}
+!0 = !{!0, i1 false}
!1 = distinct !{!1, !0, !"in"}
!2 = distinct !{!2, !0, !"tmp"}
!3 = distinct !{!3, !0, !"tmp2"}
diff --git a/llvm/test/Transforms/VectorCombine/alias.ll b/llvm/test/Transforms/VectorCombine/alias.ll
index 02aa1b63bee08..5db6eb15a078f 100644
--- a/llvm/test/Transforms/VectorCombine/alias.ll
+++ b/llvm/test/Transforms/VectorCombine/alias.ll
@@ -5,13 +5,13 @@ define <4 x i32> @quux(ptr addrspace(3) %arg) {
; CHECK-LABEL: define <4 x i32> @quux(
; CHECK-SAME: ptr addrspace(3) [[ARG:%.*]]) {
; CHECK-NEXT: [[BB:.*:]]
-; CHECK-NEXT: [[EXTRACTELEMENT:%.*]] = load i8, ptr addrspace(3) [[ARG]], align 4, !tbaa [[TBAA0:![0-9]+]], !alias.scope [[META0:![0-9]+]], !noalias [[META0]]
+; CHECK-NEXT: [[EXTRACTELEMENT:%.*]] = load i8, ptr addrspace(3) [[ARG]], align 4, !tbaa [[TBAA0:![0-9]+]], !alias.scope [[META4:![0-9]+]], !noalias [[META4]]
; CHECK-NEXT: [[TMP0:%.*]] = getelementptr inbounds <4 x i8>, ptr addrspace(3) [[ARG]], i64 0, i64 1
-; CHECK-NEXT: [[EXTRACTELEMENT1:%.*]] = load i8, ptr addrspace(3) [[TMP0]], align 1, !tbaa [[TBAA0]], !alias.scope [[META0]], !noalias [[META0]]
+; CHECK-NEXT: [[EXTRACTELEMENT1:%.*]] = load i8, ptr addrspace(3) [[TMP0]], align 1, !tbaa [[TBAA0]], !alias.scope [[META4]], !noalias [[META4]]
; CHECK-NEXT: [[TMP1:%.*]] = getelementptr inbounds <4 x i8>, ptr addrspace(3) [[ARG]], i64 0, i64 2
-; CHECK-NEXT: [[EXTRACTELEMENT2:%.*]] = load i8, ptr addrspace(3) [[TMP1]], align 2, !tbaa [[TBAA0]], !alias.scope [[META0]], !noalias [[META0]]
+; CHECK-NEXT: [[EXTRACTELEMENT2:%.*]] = load i8, ptr addrspace(3) [[TMP1]], align 2, !tbaa [[TBAA0]], !alias.scope [[META4]], !noalias [[META4]]
; CHECK-NEXT: [[TMP2:%.*]] = getelementptr inbounds <4 x i8>, ptr addrspace(3) [[ARG]], i64 0, i64 3
-; CHECK-NEXT: [[EXTRACTELEMENT3:%.*]] = load i8, ptr addrspace(3) [[TMP2]], align 1, !tbaa [[TBAA0]], !alias.scope [[META0]], !noalias [[META0]]
+; CHECK-NEXT: [[EXTRACTELEMENT3:%.*]] = load i8, ptr addrspace(3) [[TMP2]], align 1, !tbaa [[TBAA0]], !alias.scope [[META4]], !noalias [[META4]]
; CHECK-NEXT: [[ZEXT:%.*]] = zext i8 [[EXTRACTELEMENT]] to i32
; CHECK-NEXT: [[ZEXT4:%.*]] = zext i8 [[EXTRACTELEMENT1]] to i32
; CHECK-NEXT: [[ZEXT5:%.*]] = zext i8 [[EXTRACTELEMENT2]] to i32
@@ -41,17 +41,16 @@ bb:
!0 = !{!1}
!1 = distinct !{!1, !2}
-!2 = distinct !{!2}
+!2 = distinct !{!2, i1 false}
!3 = !{!"Simple C/C++ TBAA"}
!4 = !{!"omnipotent char", !3, i64 0}
!5 = !{!6, !6, i64 0, i64 0}
!6 = !{!"i8", !4}
;.
-; CHECK: [[TBAA0]] = !{[[META3:![0-9]+]], [[META3]], i64 0, i64 0}
-; CHECK: [[META3]] = !{!"i8", [[META4:![0-9]+]]}
-; CHECK: [[META4]] = !{!"omnipotent char", [[META5:![0-9]+]], i64 0}
-; CHECK: [[META5]] = !{!"Simple C/C++ TBAA"}
-; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
-; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
-; CHECK: [[META2]] = distinct !{[[META2]]}
-;.
+; CHECK: [[TBAA0]] = !{[[META1:![0-9]+]], [[META1]], i64 0, i64 0}
+; CHECK: [[META1]] = !{!"i8", [[META2:![0-9]+]]}
+; CHECK: [[META2]] = !{!"omnipotent char", [[META3:![0-9]+]], i64 0}
+; CHECK: [[META3]] = !{!"Simple C/C++ TBAA"}
+; CHECK: [[META4]] = !{[[META5:![0-9]+]]}
+; CHECK: [[META5]] = distinct !{[[META5]], [[META6:![0-9]+]]}
+; CHECK: [[META6]] = distinct !{[[META6]], i1 false}
diff --git a/llvm/test/Verifier/alias-scope-metadata.ll b/llvm/test/Verifier/alias-scope-metadata.ll
index e1672346a183f..765d82a2c9705 100644
--- a/llvm/test/Verifier/alias-scope-metadata.ll
+++ b/llvm/test/Verifier/alias-scope-metadata.ll
@@ -9,8 +9,11 @@ define void @test(ptr %p) {
load i8, ptr %p, !noalias !9
load i8, ptr %p, !noalias !11
load i8, ptr %p, !noalias !14
- load i8, ptr %p, !alias.scope !17
- call void @llvm.experimental.noalias.scope.decl(metadata !20)
+ load i8, ptr %p, !noalias !17
+ load i8, ptr %p, !noalias !20
+ load i8, ptr %p, !noalias !23
+ load i8, ptr %p, !alias.scope !26
+ call void @llvm.experimental.noalias.scope.decl(metadata !29)
ret void
}
@@ -39,23 +42,37 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!9 = !{!10}
!10 = !{!10, !"str"}
-; CHECK: domain must have one or two operands
+; CHECK: domain must have two or three operands
!11 = !{!12}
!12 = !{!12, !13}
!13 = !{}
-; CHECK: domain must have one or two operands
+; CHECK: domain must have two or three operands
!14 = !{!15}
!15 = !{!15, !16}
-!16 = !{!17, !18, !19}
+!16 = !{!16, i1 false, !"str", !"str"}
; CHECK: first domain operand must be self-referential or string
!17 = !{!18}
!18 = !{!18, !19}
-!19 = !{!20}
+!19 = !{!13, i1 false}
-; CHECK: second domain operand must be string (if used)
+; CHECK: second domain operand must be an i1 constant
!20 = !{!21}
!21 = !{!21, !22}
-!22 = !{!22, !23}
-!23 = !{}
+!22 = !{!22, i32 1}
+
+; CHECK: second domain operand must be an i1 constant
+!23 = !{!24}
+!24 = !{!24, !25}
+!25 = !{!25, !"str", !"str"}
+
+; CHECK: third domain operand must be string (if used)
+!26 = !{!27}
+!27 = !{!27, !28}
+!28 = !{!28, i1 false, !13}
+
+; CHECK: domain must have two or three operands
+!29 = !{!30}
+!30 = !{!30, !31}
+!31 = !{!31, i1 false, !"str", !"str"}
diff --git a/llvm/test/Verifier/noalias_scope_decl.ll b/llvm/test/Verifier/noalias_scope_decl.ll
index b457c5129dd57..d45f654422d90 100644
--- a/llvm/test/Verifier/noalias_scope_decl.ll
+++ b/llvm/test/Verifier/noalias_scope_decl.ll
@@ -54,7 +54,7 @@ attributes #1 = { inaccessiblememonly nounwind }
!1 = !{!"clang"}
!2 = !{!3}
!3 = distinct !{!3, !4, !"test: pA"}
-!4 = distinct !{!4, !"test"}
+!4 = distinct !{!4, i1 false, !"test"}
!5 = !{!3, !3}
!6 = !{!3}
!7 = distinct !{!7, !4, !"test: pB"}
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll
index 844a1087b61cf..5016becf2f633 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll
@@ -8,4 +8,4 @@ define i32 @dot_value_and_metadata_string(ptr %p, i32 %n) {
!0 = !{!1}
!1 = distinct !{!1, !2, !"callee: %.arg"}
-!2 = distinct !{!2, !"callee"}
+!2 = distinct !{!2, i1 false, !"callee"}
diff --git a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll.expected b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll.expected
index 2fc57109e00d0..066c256d55b2d 100644
--- a/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll.expected
+++ b/llvm/test/tools/UpdateTestChecks/update_test_checks/Inputs/dot_value_in_metadata_string.ll.expected
@@ -14,9 +14,9 @@ define i32 @dot_value_and_metadata_string(ptr %p, i32 %n) {
!0 = !{!1}
!1 = distinct !{!1, !2, !"callee: %.arg"}
-!2 = distinct !{!2, !"callee"}
+!2 = distinct !{!2, i1 false, !"callee"}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]], !"callee: %.arg"}
-; CHECK: [[META2]] = distinct !{[[META2]], !"callee"}
+; CHECK: [[META2]] = distinct !{[[META2]], i1 false, !"callee"}
;.
diff --git a/llvm/test/tools/llubi/noalias_scope.ll b/llvm/test/tools/llubi/noalias_scope.ll
index 1cd764b957d25..ec5e13366ef72 100644
--- a/llvm/test/tools/llubi/noalias_scope.ll
+++ b/llvm/test/tools/llubi/noalias_scope.ll
@@ -9,7 +9,7 @@ entry:
!0 = !{!1}
!1 = distinct !{!1, !2, !"func: %agg.result"}
-!2 = distinct !{!2, !"func"}
+!2 = distinct !{!2, i1 false, !"func"}
; CHECK: Entering function: main
; CHECK-NEXT: tail call void @llvm.experimental.noalias.scope.decl(metadata !{{[0-9]+}})
; CHECK-NEXT: ret void
diff --git a/llvm/unittests/MIR/MachineMetadata.cpp b/llvm/unittests/MIR/MachineMetadata.cpp
index 98c8afc0a5fa6..e55edcb7758a5 100644
--- a/llvm/unittests/MIR/MachineMetadata.cpp
+++ b/llvm/unittests/MIR/MachineMetadata.cpp
@@ -265,7 +265,7 @@ body: |
std::string Output = print([&](raw_ostream &OS) { printMIR(OS, MMI, *MF); });
std::string CheckString = R"(
CHECK: machineMetadataNodes:
-CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"domain"}
+CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"domain"}
CHECK-DAG: ![[MMSCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope0"}
CHECK-DAG: ![[MMSCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope1"}
CHECK-DAG: ![[MMSET0:[0-9]+]] = !{![[MMSCOPE0]]}
@@ -475,7 +475,7 @@ body: |
std::string Output = print([&](raw_ostream &OS) { printMIR(OS, MMI, *MF); });
std::string CheckString = R"(
CHECK: machineMetadataNodes:
-CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"domain"}
+CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"domain"}
CHECK-DAG: ![[MMSCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope0"}
CHECK-DAG: ![[MMSCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope1"}
CHECK-DAG: ![[MMSET0:[0-9]+]] = !{![[MMSCOPE0]]}
@@ -579,7 +579,7 @@ body: |
std::string Output = print([&](raw_ostream &OS) { printMIR(OS, MMI, *MF); });
std::string CheckString = R"(
CHECK: machineMetadataNodes:
-CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, !"domain"}
+CHECK-DAG: ![[MMDOMAIN:[0-9]+]] = distinct !{!{{[0-9]+}}, i1 false, !"domain"}
CHECK-DAG: ![[MMSCOPE0:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope0"}
CHECK-DAG: ![[MMSCOPE1:[0-9]+]] = distinct !{!{{[0-9]+}}, ![[MMDOMAIN]], !"scope1"}
CHECK-DAG: ![[MMSET0:[0-9]+]] = !{![[MMSCOPE0]]}
diff --git a/mlir/lib/Target/LLVMIR/ModuleImport.cpp b/mlir/lib/Target/LLVMIR/ModuleImport.cpp
index e92a1740f30b5..cf8a062d40138 100644
--- a/mlir/lib/Target/LLVMIR/ModuleImport.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleImport.cpp
@@ -577,9 +577,9 @@ ModuleImport::processAliasScopeMetadata(const llvm::MDNode *node) {
// Helper that creates an alias scope domain attribute.
auto createAliasScopeDomainOp = [&](const llvm::MDNode *aliasDomain) {
StringAttr description = nullptr;
- if (aliasDomain->getNumOperands() >= 2)
- if (auto *operand = dyn_cast<llvm::MDString>(aliasDomain->getOperand(1)))
- description = builder.getStringAttr(operand->getString());
+ StringRef name = llvm::AliasScopeDomainNode(aliasDomain).getName();
+ if (!name.empty())
+ description = builder.getStringAttr(name);
Attribute idAttr = getIdAttr(aliasDomain);
return builder.getAttr<AliasScopeDomainAttr>(idAttr, description);
};
@@ -598,7 +598,7 @@ ModuleImport::processAliasScopeMetadata(const llvm::MDNode *node) {
!verifyDescription(scope, 2))
return emitError(loc) << "unsupported alias scope node: "
<< diagMD(scope, llvmModule.get());
- if (!verifySelfRefOrString(domain) || !verifyDescription(domain, 1))
+ if (!verifySelfRefOrString(domain) || !verifyDescription(domain, 2))
return emitError(loc) << "unsupported alias domain node: "
<< diagMD(domain, llvmModule.get());
diff --git a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
index bd11a493f4bd3..3738c6b9771ef 100644
--- a/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleTranslation.cpp
@@ -2338,9 +2338,11 @@ ModuleTranslation::getOrCreateAliasScope(AliasScopeAttr aliasScopeAttr) {
auto [domainIt, insertedDomain] = aliasDomainMetadataMapping.try_emplace(
aliasScopeAttr.getDomain(), nullptr);
if (insertedDomain) {
- llvm::SmallVector<llvm::Metadata *, 2> operands;
+ llvm::SmallVector<llvm::Metadata *, 3> operands;
// Placeholder for potential self-reference.
operands.push_back(dummy.get());
+ operands.push_back(
+ llvm::ConstantAsMetadata::get(llvm::ConstantInt::getFalse(ctx)));
if (StringAttr description = aliasScopeAttr.getDomain().getDescription())
operands.push_back(llvm::MDString::get(ctx, description));
domainIt->second = llvm::MDNode::get(ctx, operands);
diff --git a/mlir/test/Target/LLVMIR/Import/import-failure.ll b/mlir/test/Target/LLVMIR/Import/import-failure.ll
index 7dca9a3ed2be6..91f558ebf4f08 100644
--- a/mlir/test/Target/LLVMIR/Import/import-failure.ll
+++ b/mlir/test/Target/LLVMIR/Import/import-failure.ll
@@ -287,7 +287,7 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!0 = !{!1}
!1 = !{!1, !2}
-!2 = distinct !{!2, !"The domain"}
+!2 = distinct !{!2, i1 false, !"The domain"}
; // -----
diff --git a/mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll b/mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
index bf4c85786216f..fcdbcfcc7e499 100644
--- a/mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
+++ b/mlir/test/Target/LLVMIR/Import/metadata-alias-scopes.ll
@@ -22,7 +22,7 @@ define void @alias_scope(ptr %arg1) {
ret void
}
-!0 = distinct !{!0, !"The domain"}
+!0 = distinct !{!0, i1 false, !"The domain"}
!1 = distinct !{!1, !0, !"The first scope"}
!2 = distinct !{!2, !0}
!3 = distinct !{!3, !0}
@@ -49,8 +49,8 @@ define void @two_domains(ptr %arg1) {
ret void
}
-!0 = distinct !{!0, !"The domain"}
-!1 = distinct !{!1}
+!0 = distinct !{!0, i1 false, !"The domain"}
+!1 = distinct !{!1, i1 false}
!2 = !{!2, !0}
!3 = !{!3, !1}
!4 = !{!2}
@@ -89,7 +89,7 @@ declare void @llvm.memcpy.p0.p0.i32(ptr noalias nocapture writeonly, ptr noalias
declare void @llvm.memset.p0.i32(ptr nocapture writeonly, i8, i32, i1 immarg)
declare void @foo(ptr %arg1)
-!0 = distinct !{!0, !"The domain"}
+!0 = distinct !{!0, i1 false, !"The domain"}
!1 = !{!1, !0}
!2 = !{!1}
@@ -117,7 +117,7 @@ define void @alias_scope(ptr %arg1) {
ret void
}
-!0 = !{!"domain1"}
+!0 = !{!"domain1", i1 false}
!1 = !{!"scopeid1", !0, !"The first scope"}
!2 = !{!"scopeid2", !0}
!3 = !{!"scopeid3", !0}
diff --git a/mlir/test/Target/LLVMIR/attribute-alias-scopes.mlir b/mlir/test/Target/LLVMIR/attribute-alias-scopes.mlir
index 09d781fbbb404..0966ea3e83795 100644
--- a/mlir/test/Target/LLVMIR/attribute-alias-scopes.mlir
+++ b/mlir/test/Target/LLVMIR/attribute-alias-scopes.mlir
@@ -38,7 +38,7 @@ llvm.func @alias_scopes(%arg1 : !llvm.ptr) {
// CHECK-DAG: declare void @llvm.memset.p0.i32(ptr writeonly captures(none), i8, i32, i1 immarg)
// Check the translated metadata.
-// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]], !"The domain"}
+// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]], i1 false, !"The domain"}
// CHECK-DAG: ![[SCOPE1:[0-9]+]] = distinct !{![[SCOPE1]], ![[DOMAIN]], !"The first scope"}
// CHECK-DAG: ![[SCOPE2:[0-9]+]] = distinct !{![[SCOPE2]], ![[DOMAIN]]}
// CHECK-DAG: ![[SCOPE3:[0-9]+]] = distinct !{![[SCOPE3]], ![[DOMAIN]]}
@@ -66,7 +66,7 @@ llvm.func @noalias_intr_only() {
}
// Check the translated metadata.
-// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]], !"The domain"}
+// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]], i1 false, !"The domain"}
// CHECK-DAG: ![[SCOPE:[0-9]+]] = distinct !{![[SCOPE]], ![[DOMAIN]]}
// CHECK-DAG: ![[SCOPES]] = !{![[SCOPE]]}
@@ -99,7 +99,7 @@ llvm.func @self_reference() {
// Check that the translated subroutine types do not reference the access group
// domain since both of them are created as metadata list with a null entry.
-// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]]}
+// CHECK-DAG: ![[DOMAIN:[0-9]+]] = distinct !{![[DOMAIN]], i1 false}
// CHECK-DAG: ![[SCOPE:[0-9]+]] = distinct !{![[SCOPE]], ![[DOMAIN]]}
// CHECK-DAG: ![[SCOPES]] = !{![[SCOPE]]}
// CHECK-DAG: = !DISubroutineType(types: ![[TYPES:[0-9]+]])
@@ -145,7 +145,7 @@ llvm.func @alias_scopes(%arg1 : !llvm.ptr) {
// CHECK-DAG: declare void @llvm.memset.p0.i32(ptr writeonly captures(none), i8, i32, i1 immarg)
// Check the translated metadata.
-// CHECK-DAG: ![[DOMAIN:[0-9]+]] = !{!"domain1", !"The domain"}
+// CHECK-DAG: ![[DOMAIN:[0-9]+]] = !{!"domain1", i1 false, !"The domain"}
// CHECK-DAG: ![[SCOPE1:[0-9]+]] = !{!"scope1", ![[DOMAIN]], !"The first scope"}
// CHECK-DAG: ![[SCOPE2:[0-9]+]] = !{!"scope2", ![[DOMAIN]]}
// CHECK-DAG: ![[SCOPE3:[0-9]+]] = !{!"scope3", ![[DOMAIN]]}
diff --git a/polly/lib/CodeGen/IRBuilder.cpp b/polly/lib/CodeGen/IRBuilder.cpp
index b461b72170c77..da1cd9edd58b1 100644
--- a/polly/lib/CodeGen/IRBuilder.cpp
+++ b/polly/lib/CodeGen/IRBuilder.cpp
@@ -60,7 +60,9 @@ void ScopAnnotator::buildAliasScopes(Scop &S) {
SE = S.getSE();
LLVMContext &Ctx = SE->getContext();
- AliasScopeDomain = getID(Ctx, MDString::get(Ctx, "polly.alias.scope.domain"));
+ AliasScopeDomain =
+ getID(Ctx, ConstantAsMetadata::get(ConstantInt::getFalse(Ctx)),
+ MDString::get(Ctx, "polly.alias.scope.domain"));
AliasScopeMap.clear();
OtherAliasScopeListMap.clear();
diff --git a/polly/test/CodeGen/MemAccess/create_arrays.ll b/polly/test/CodeGen/MemAccess/create_arrays.ll
index 29eaff8ad3fab..529e113d59ae1 100644
--- a/polly/test/CodeGen/MemAccess/create_arrays.ll
+++ b/polly/test/CodeGen/MemAccess/create_arrays.ll
@@ -37,7 +37,7 @@
; CODEGEN: !3 = distinct !{!3, !1}
; CODEGEN: !4 = !{!5}
; CODEGEN: !5 = distinct !{!5, !6, !"polly.alias.scope.E"}
-; CODEGEN: !6 = distinct !{!6, !"polly.alias.scope.domain"}
+; CODEGEN: !6 = distinct !{!6, i1 false, !"polly.alias.scope.domain"}
; CODEGEN: !7 = !{!8, !9, !10, !11}
; CODEGEN: !8 = distinct !{!8, !6, !"polly.alias.scope.MemRef_B"}
; CODEGEN: !9 = distinct !{!9, !6, !"polly.alias.scope.MemRef_A"}
diff --git a/polly/test/CodeGen/annotated_alias_scopes.ll b/polly/test/CodeGen/annotated_alias_scopes.ll
index 1f3a07b5519be..85b12afe324ab 100644
--- a/polly/test/CodeGen/annotated_alias_scopes.ll
+++ b/polly/test/CodeGen/annotated_alias_scopes.ll
@@ -14,7 +14,7 @@
; SCOPES: !1 = !{!"llvm.loop.vectorize.disable"}
; SCOPES: !2 = !{!3}
; SCOPES: !3 = distinct !{!3, !4, !"polly.alias.scope.MemRef_B"}
-; SCOPES: !4 = distinct !{!4, !"polly.alias.scope.domain"}
+; SCOPES: !4 = distinct !{!4, i1 false, !"polly.alias.scope.domain"}
; SCOPES: !5 = !{!6, !7}
; SCOPES: !6 = distinct !{!6, !4, !"polly.alias.scope.MemRef_C"}
; SCOPES: !7 = distinct !{!7, !4, !"polly.alias.scope.MemRef_A"}
diff --git a/polly/test/CodeGen/invariant_load_alias_metadata.ll b/polly/test/CodeGen/invariant_load_alias_metadata.ll
index 2a704ee9c576a..3d27da187026f 100644
--- a/polly/test/CodeGen/invariant_load_alias_metadata.ll
+++ b/polly/test/CodeGen/invariant_load_alias_metadata.ll
@@ -7,7 +7,7 @@
;
; CHECK: !0 = !{!1}
; CHECK-NEXT: !1 = distinct !{!1, !2, !"polly.alias.scope.MemRef_A"}
-; CHECK-NEXT: !2 = distinct !{!2, !"polly.alias.scope.domain"}
+; CHECK-NEXT: !2 = distinct !{!2, i1 false, !"polly.alias.scope.domain"}
; CHECK-NEXT: !3 = !{!4}
; CHECK-NEXT: !4 = distinct !{!4, !2, !"polly.alias.scope.MemRef_ptrA"}
;
diff --git a/polly/test/CodeGen/scev-backedgetaken.ll b/polly/test/CodeGen/scev-backedgetaken.ll
index df416f3d6f63e..78e480fac341e 100644
--- a/polly/test/CodeGen/scev-backedgetaken.ll
+++ b/polly/test/CodeGen/scev-backedgetaken.ll
@@ -47,5 +47,5 @@ for.cond.cleanup.loopexit:
; CHECK: !1 = !{!"llvm.loop.vectorize.disable"}
; CHECK: !2 = !{!3}
; CHECK: !3 = distinct !{!3, !4, !"polly.alias.scope.MemRef_d"}
-; CHECK: !4 = distinct !{!4, !"polly.alias.scope.domain"}
+; CHECK: !4 = distinct !{!4, i1 false, !"polly.alias.scope.domain"}
; CHECK: !5 = !{}
>From 6bcefdd84c3b91fc9121550f537a04fc32a25e29 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Thu, 27 Aug 2026 17:06:58 +0000
Subject: [PATCH 2/9] Review feedback
---
llvm/docs/LangRef.md | 17 ++++++++----
llvm/include/llvm/Analysis/ScopedNoAliasAA.h | 3 ++-
llvm/lib/Analysis/ScopedNoAliasAA.cpp | 28 ++++++++++----------
3 files changed, 28 insertions(+), 20 deletions(-)
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 11037c482daf5..61e1d55c0c824 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7618,6 +7618,13 @@ subset of (or equal to) the set of scopes for that domain in another
instruction's `noalias` list, then the two memory accesses are assumed not to
alias.
+If a domain is declared as having disjoint scopes, two memory accesses are
+assumed not to alias if the they both have entries for that domain in their
+`alias.scope` list and their `alias.scope` lists have no scopes in common for that
+domain. Equivalently, an instruction with a set of scopes from a disjoint-scope
+domain in its `alias.scope` list implicitly has all other scopes in that domain
+in its `noalias` set.
+
Because scopes in one domain don't affect scopes in other domains, separate
domains can be used to compose multiple independent noalias sets. This is
used for example during inlining. As the noalias function parameters are
@@ -14014,7 +14021,7 @@ This instruction requires several arguments:
```llvm
declare void @take_byval(ptr byval(i64))
declare void @take_ptr(ptr)
-
+
; Invalid (assuming @take_ptr dereferences the pointer), because %local
; may be de-allocated before the call to @take_ptr.
define void @invalid_alloca() {
@@ -14023,7 +14030,7 @@ This instruction requires several arguments:
tail call void @take_ptr(ptr %local)
ret void
}
-
+
; Valid, the byval attribute causes the memory allocated by %local to be
; copied into @take_byval's stack frame.
define void @byval_alloca() {
@@ -14032,7 +14039,7 @@ This instruction requires several arguments:
tail call void @take_byval(ptr byval(i64) %local)
ret void
}
-
+
; Invalid, because @use_global_va_list uses the variadic arguments from
; @invalid_va_list.
%struct.va_list = type { ptr }
@@ -14048,14 +14055,14 @@ This instruction requires several arguments:
tail call void @use_global_va_list()
ret void
}
-
+
; Valid, byval argument forwarded to tail call as another byval argument.
define void @forward_byval(ptr byval(i64) %x) {
entry:
tail call void @take_byval(ptr byval(i64) %x)
ret void
}
-
+
; Invalid (assuming @take_ptr dereferences the pointer), byval argument
; passed to tail callee as non-byval ptr.
define void @invalid_byval(ptr byval(i64) %x) {
diff --git a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
index 98cc3161f7f53..481b8cadbd397 100644
--- a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
+++ b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
@@ -54,7 +54,8 @@ class ScopedNoAliasAAResult : public AAResultBase {
LLVM_ABI static void
collectScopedDomains(const MDNode *NoAlias,
- SmallPtrSetImpl<const MDNode *> &Domains);
+ SmallPtrSetImpl<const MDNode *> &Domains,
+ bool DisjointOnly = false);
LLVM_ABI static bool mayAliasInScopes(const MDNode *Scopes,
const MDNode *NoAlias);
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
index f005f6ac927f3..5623bc2919388 100644
--- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp
+++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
@@ -25,14 +25,17 @@
// ... = load %ptr1, !alias.scope !{ !scope1 }
// ... = load %ptr2, !alias.scope !{ !scope1, !scope2 }, !noalias !{ !scope1 }
//
-// When evaluating an aliasing query, if one of the instructions is associated
+// When evaluating an aliasing query, if one of the instructions
// has a set of noalias scopes in some domain that is a superset of the alias
// scopes in that domain of some other instruction, then the two memory
// accesses are assumed not to alias.
//
-// A domain can also declare its scopes to be disjoint, in which case tagging
-// an instruction with an alias scope from that domain implicitly tags it with
-// a noalias set containing every other scope in that domain:
+// If a domain is declared as having disjoint scopes, two memory accesses are
+// assumed not to alias if the they both have entries for that domain in their
+// `alias.scope` list and their `alias.scope` lists have no scopes in common for
+// that domain. Equivalently, an instruction with a set of scopes from a
+// disjoint-scope domain in its `alias.scope` list implicitly has all other
+// scopes in that domain in its `noalias` set. For example,
//
// !dom1 = metadata !{ metadata !dom1, i1 true, metadata !"disjoint domain" }
// !scope3 = metadata !{ metadata !scope3, metadata !dom1 }
@@ -166,14 +169,16 @@ static void collectMDInDomain(const MDNode *List, const MDNode *Domain,
/// Collect the set of scoped domains relevant to the noalias scopes.
void ScopedNoAliasAAResult::collectScopedDomains(
- const MDNode *NoAlias, SmallPtrSetImpl<const MDNode *> &Domains) {
+ const MDNode *NoAlias, SmallPtrSetImpl<const MDNode *> &Domains,
+ bool DisjointOnly) {
if (!NoAlias)
return;
assert(Domains.empty() && "Domains should be empty");
for (const MDOperand &MDOp : NoAlias->operands())
if (const MDNode *NAMD = dyn_cast<MDNode>(MDOp))
if (const MDNode *Domain = AliasScopeNode(NAMD).getDomain())
- Domains.insert(Domain);
+ if (!DisjointOnly || AliasScopeDomainNode(Domain).hasDisjointScopes())
+ Domains.insert(Domain);
}
bool ScopedNoAliasAAResult::mayAliasInScopes(const MDNode *Scopes,
@@ -211,15 +216,10 @@ bool ScopedNoAliasAAResult::mayAliasInDisjointDomains(const MDNode *Scopes1,
// Collect the domains with disjoint scopes that the first access is in.
SmallPtrSet<const MDNode *, 16> Domains;
- for (const MDOperand &MDOp : Scopes1->operands())
- if (const MDNode *MD = dyn_cast<MDNode>(MDOp))
- if (const MDNode *Domain = AliasScopeNode(MD).getDomain())
- if (AliasScopeDomainNode(Domain).hasDisjointScopes())
- Domains.insert(Domain);
+ collectScopedDomains(Scopes1, Domains, /*DisjointOnly=*/true);
- // Each access is implicitly noalias with every scope of such a domain it is
- // not itself in, so the accesses don't alias if, for some domain, they have
- // no scope in common.
+ // The accesses don't alias if, for some domain, both accesses use at lesat
+ // one of its scopes and have no scopes in that domain in common.
for (const MDNode *Domain : Domains) {
SmallPtrSet<const MDNode *, 16> Nodes2;
collectMDInDomain(Scopes2, Domain, Nodes2);
>From f77dc722e457b9b9822782667996f5c1d8cdc63f Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Thu, 27 Aug 2026 18:19:45 +0000
Subject: [PATCH 3/9] Add a warning about string names on disjoint
---
llvm/docs/LangRef.md | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 61e1d55c0c824..18f97d9600a63 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7646,6 +7646,10 @@ instruction's `!alias.scope` list. This makes it unnecessary to spell out the
complement of each scope when a group of N pointers is known to be mutually
non-aliasing.
+String names should not be used with disjoint-scope domains, as they will be
+uniqued accross different invocations of the same function, and this is unlikely
+to be desirable behavior.
+
The metadata identifying each scope is also itself a list containing two or
three entries. The first entry is the name of the scope. Note that if the name
is a string then it can be combined across functions and translation units. A
>From 41f28a0d66c34727bf781cb9b73eccffaa84aa20 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Thu, 10 Sep 2026 22:44:28 +0000
Subject: [PATCH 4/9] Update docs
---
llvm/docs/LangRef.md | 17 +++++++----------
1 file changed, 7 insertions(+), 10 deletions(-)
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 18f97d9600a63..6b9f1a9a290e4 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7623,7 +7623,9 @@ assumed not to alias if the they both have entries for that domain in their
`alias.scope` list and their `alias.scope` lists have no scopes in common for that
domain. Equivalently, an instruction with a set of scopes from a disjoint-scope
domain in its `alias.scope` list implicitly has all other scopes in that domain
-in its `noalias` set.
+in its `noalias` set. This removes the need to spell out the complement of each
+alias scope when there is a set of N objects that mutually don't alias each other,
+simplifying the IR and reducing its size for this straightforward case.
Because scopes in one domain don't affect scopes in other domains, separate
domains can be used to compose multiple independent noalias sets. This is
@@ -7639,13 +7641,6 @@ entry is an `i1` constant that marks the domain as having disjoint scopes when
it is `true`. A descriptive string may optionally be provided as a third list
entry.
-If an alias scope domain has disjoint scopes, tagging an instruction with an
-`alias.scope` within that domain implicitly tags that instruction with a
-`noalias` set containing all scopes in that domain not present in the
-instruction's `!alias.scope` list. This makes it unnecessary to spell out the
-complement of each scope when a group of N pointers is known to be mutually
-non-aliasing.
-
String names should not be used with disjoint-scope domains, as they will be
uniqued accross different invocations of the same function, and this is unlikely
to be desirable behavior.
@@ -7705,8 +7700,10 @@ And, with a domain whose scopes are disjoint,
!6 = !{!2, !3}
!7 = !{!1, !3}
-; These two instructions don't alias, because tagging them with !1 and !2
-; implicitly tags them with !noalias !6 and !noalias !7, respectively:
+; These two instructions don't alias, because tagging them with !4 and !5
+; means that they are both tagged with scopes from a disjoint domain (!1 and !2,
+; respectively) and have no scoes from that domain in common. This is equivalent
+; to tagging them them with !noalias !6 and !noalias !7, respectively:
%0 = load float, ptr %a, align 4, !alias.scope !4
store float %0, ptr %b, align 4, !alias.scope !5
>From a17e58b6278c7065944068f2293f2f684275825f Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Mon, 14 Sep 2026 17:19:11 +0000
Subject: [PATCH 5/9] Update tests for rebase
---
.../Analysis/ScopedNoAliasAA/disjoint-domains.ll | 12 ++++++------
llvm/test/CodeGen/SystemZ/Large/branch-01.ll | 6 +++---
.../test/Transforms/LoopVectorize/VPlan/cse-loads.ll | 2 +-
.../ScalarizeMaskedMemIntrin/X86/metadata.ll | 4 ++--
.../LLVMIR/Import/masked-intrinsic-metadata.ll | 2 +-
.../Target/LLVMIR/masked-intrinsic-metadata.mlir | 2 +-
6 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll b/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
index 9b807d0fe85e4..1d2b88a582177 100644
--- a/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
+++ b/llvm/test/Analysis/ScopedNoAliasAA/disjoint-domains.ll
@@ -7,7 +7,7 @@ entry:
%arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
-; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !{{[0-9]+}}
ret void
}
@@ -20,9 +20,9 @@ entry:
%arrayidx.i2 = getelementptr inbounds float, ptr %a, i64 15
store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5
-; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
-; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5
-; CHECK: NoAlias: store float %0, ptr %arrayidx.i2, align 4, !alias.scope !5 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !4
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !{{[0-9]+}}
+; CHECK: NoAlias: %0 = load float, ptr %c, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i2, align 4, !alias.scope !{{[0-9]+}}
+; CHECK: NoAlias: store float %0, ptr %arrayidx.i2, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !{{[0-9]+}}
ret void
}
@@ -33,7 +33,7 @@ entry:
%arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
store float %0, ptr %arrayidx.i, align 4, !alias.scope !10
-; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !{{[0-9]+}}
ret void
}
@@ -44,7 +44,7 @@ entry:
%arrayidx.i = getelementptr inbounds float, ptr %a, i64 5
store float %0, ptr %arrayidx.i, align 4, !alias.scope !13
-; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !0 <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !3
+; CHECK: MayAlias: %0 = load float, ptr %c, align 4, !alias.scope !{{[0-9]+}} <-> store float %0, ptr %arrayidx.i, align 4, !alias.scope !{{[0-9]+}}
ret void
}
diff --git a/llvm/test/CodeGen/SystemZ/Large/branch-01.ll b/llvm/test/CodeGen/SystemZ/Large/branch-01.ll
index 482b19a17fd68..687965c2cdb79 100644
--- a/llvm/test/CodeGen/SystemZ/Large/branch-01.ll
+++ b/llvm/test/CodeGen/SystemZ/Large/branch-01.ll
@@ -11876,9 +11876,9 @@ attributes #4 = { nounwind }
!0 = !{!"clang version 7.0.0"}
!1 = !{!2, !4}
!2 = distinct !{!2, !3, !"func_62: %agg.result"}
-!3 = distinct !{!3, !"func_62"}
+!3 = distinct !{!3, i1 false, !"func_62"}
!4 = distinct !{!4, !5, !"func_1: %agg.result"}
-!5 = distinct !{!5, !"func_1"}
+!5 = distinct !{!5, i1 false, !"func_1"}
!6 = !{!7, !9, i64 4}
!7 = !{!"S9", !8, i64 0, !9, i64 4, !11, i64 6, !8, i64 8, !12, i64 12}
!8 = !{!"int", !9, i64 0}
@@ -11891,7 +11891,7 @@ attributes #4 = { nounwind }
!15 = !{!8, !8, i64 0}
!16 = !{!17, !4}
!17 = distinct !{!17, !18, !"func_32: %agg.result"}
-!18 = distinct !{!18, !"func_32"}
+!18 = distinct !{!18, i1 false, !"func_32"}
!19 = !{!9, !9, i64 0}
!20 = !{!11, !11, i64 0}
!21 = !{!22, !22, i64 0}
diff --git a/llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll b/llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
index 34dbaef2b17a0..ac24a162d5028 100644
--- a/llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
+++ b/llvm/test/Transforms/LoopVectorize/VPlan/cse-loads.ll
@@ -779,7 +779,7 @@ exit:
!0 = !{!1}
!1 = distinct !{!1, !2, !"scope_a"}
-!2 = distinct !{!2, !"domain"}
+!2 = distinct !{!2, i1 false, !"domain"}
!3 = !{!4}
!4 = distinct !{!4, !2, !"scope_b"}
!5 = !{!6, !6, i64 0}
diff --git a/llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/metadata.ll b/llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/metadata.ll
index 59b1895deb92d..22142eecf3e3c 100644
--- a/llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/metadata.ll
+++ b/llvm/test/Transforms/ScalarizeMaskedMemIntrin/X86/metadata.ll
@@ -370,7 +370,7 @@ declare <2 x float> @llvm.masked.load.v2f32.p0(ptr, i32, <2 x i1>, <2 x float>)
!5 = !{!"ScalarizeMaskedMemIntrin metadata"}
!6 = !{!7}
!7 = distinct !{!7, !8, !"scope"}
-!8 = distinct !{!8, !"domain"}
+!8 = distinct !{!8, i1 false, !"domain"}
!9 = distinct !{}
!10 = !{!"test", !"relaxed"}
!11 = !{i32 1}
@@ -410,7 +410,7 @@ declare <2 x float> @llvm.masked.load.v2f32.p0(ptr, i32, <2 x i1>, <2 x float>)
; CHECK: [[META8]] = !{}
; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
; CHECK: [[META10]] = distinct !{[[META10]], [[META11:![0-9]+]], !"scope"}
-; CHECK: [[META11]] = distinct !{[[META11]], !"domain"}
+; CHECK: [[META11]] = distinct !{[[META11]], i1 false, !"domain"}
; CHECK: [[META12]] = !{i32 1}
; CHECK: [[META13]] = distinct !{}
; CHECK: [[META14]] = !{!"test.annotation"}
diff --git a/mlir/test/Target/LLVMIR/Import/masked-intrinsic-metadata.ll b/mlir/test/Target/LLVMIR/Import/masked-intrinsic-metadata.ll
index bf812efc72571..1293d7004f24a 100644
--- a/mlir/test/Target/LLVMIR/Import/masked-intrinsic-metadata.ll
+++ b/mlir/test/Target/LLVMIR/Import/masked-intrinsic-metadata.ll
@@ -61,4 +61,4 @@ declare void @llvm.masked.scatter.v7f32.v7p0(<7 x float>, <7 x ptr>, <7 x i1>)
!6 = distinct !{!6, !9, !"scope"}
!7 = !{!8}
!8 = distinct !{!8, !9, !"noalias"}
-!9 = distinct !{!9, !"domain"}
+!9 = distinct !{!9, i1 false, !"domain"}
diff --git a/mlir/test/Target/LLVMIR/masked-intrinsic-metadata.mlir b/mlir/test/Target/LLVMIR/masked-intrinsic-metadata.mlir
index 6ef0fa4a183af..ee783f896f2d7 100644
--- a/mlir/test/Target/LLVMIR/masked-intrinsic-metadata.mlir
+++ b/mlir/test/Target/LLVMIR/masked-intrinsic-metadata.mlir
@@ -63,7 +63,7 @@ llvm.func @masked_gather_scatter_metadata(%ptrs: vector<7 x !llvm.ptr>, %mask: v
// CHECK-DAG: ![[TBAA_ROOT]] = !{!"Simple C/C++ TBAA"}
// CHECK-DAG: ![[$SCOPE1]] = !{![[SCOPE1_DECL:[0-9]+]]}
// CHECK-DAG: ![[SCOPE1_DECL]] = distinct !{![[SCOPE1_DECL]], ![[DOMAIN:[0-9]+]], !"The first scope"}
-// CHECK-DAG: ![[DOMAIN]] = distinct !{![[DOMAIN]], !"The domain"}
+// CHECK-DAG: ![[DOMAIN]] = distinct !{![[DOMAIN]], i1 false, !"The domain"}
// CHECK-DAG: ![[$SCOPE2]] = !{![[SCOPE2_DECL:[0-9]+]]}
// CHECK-DAG: ![[SCOPE2_DECL]] = distinct !{![[SCOPE2_DECL]], ![[DOMAIN]], !"The second scope"}
// CHECK-DAG: ![[$AG]] = distinct !{}
>From 9416422d94d399dc1133d1eef7a520d532dfd467 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Wed, 16 Sep 2026 22:47:46 +0000
Subject: [PATCH 6/9] Update tests introduced recently
---
llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll b/llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
index 468cc9d554f6c..be2d87a4fc90d 100644
--- a/llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
+++ b/llvm/test/Transforms/LICM/scalar-promote-aa-tags.ll
@@ -414,7 +414,7 @@ exit:
!3 = !{!5, !5, i64 0}
!4 = !{!"int", !1}
!5 = !{!"float", !1}
-!6 = !{!6}
+!6 = !{!6, i1 false}
!7 = !{!7, !6}
!8 = !{!7}
!9 = !{!10, !10, i64 0}
@@ -430,5 +430,5 @@ exit:
; CHECK: [[META7]] = !{!"unsigned int", [[META2]]}
; CHECK: [[META8]] = !{[[META9:![0-9]+]]}
; CHECK: [[META9]] = distinct !{[[META9]], [[META10:![0-9]+]]}
-; CHECK: [[META10]] = distinct !{[[META10]]}
+; CHECK: [[META10]] = distinct !{[[META10]], i1 false}
;.
>From d72424eb7d9c35b423abf8cd0b6726bf1313c566 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Fri, 18 Sep 2026 17:33:25 +0000
Subject: [PATCH 7/9] Review feedback
---
llvm/docs/LangRef.md | 20 ++++++++--------
llvm/include/llvm/Analysis/ScopedNoAliasAA.h | 6 ++---
llvm/include/llvm/IR/MDBuilder.h | 9 ++++----
llvm/lib/Analysis/ScopedNoAliasAA.cpp | 2 +-
llvm/lib/Bitcode/Reader/MetadataLoader.cpp | 24 +++++++++-----------
llvm/lib/IR/MDBuilder.cpp | 6 ++---
6 files changed, 33 insertions(+), 34 deletions(-)
diff --git a/llvm/docs/LangRef.md b/llvm/docs/LangRef.md
index 6b9f1a9a290e4..635b99dac1975 100644
--- a/llvm/docs/LangRef.md
+++ b/llvm/docs/LangRef.md
@@ -7619,7 +7619,7 @@ instruction's `noalias` list, then the two memory accesses are assumed not to
alias.
If a domain is declared as having disjoint scopes, two memory accesses are
-assumed not to alias if the they both have entries for that domain in their
+assumed not to alias if they both have entries for that domain in their
`alias.scope` list and their `alias.scope` lists have no scopes in common for that
domain. Equivalently, an instruction with a set of scopes from a disjoint-scope
domain in its `alias.scope` list implicitly has all other scopes in that domain
@@ -7642,7 +7642,7 @@ it is `true`. A descriptive string may optionally be provided as a third list
entry.
String names should not be used with disjoint-scope domains, as they will be
-uniqued accross different invocations of the same function, and this is unlikely
+uniqued across different invocations of the same function, and this is unlikely
to be desirable behavior.
The metadata identifying each scope is also itself a list containing two or
@@ -7701,9 +7701,9 @@ And, with a domain whose scopes are disjoint,
!7 = !{!1, !3}
; These two instructions don't alias, because tagging them with !4 and !5
-; means that they are both tagged with scopes from a disjoint domain (!1 and !2,
-; respectively) and have no scoes from that domain in common. This is equivalent
-; to tagging them them with !noalias !6 and !noalias !7, respectively:
+; means that they are both tagged with scopes from a disjoint-scope domain (!1
+; and !2, respectively) and have no scopes from that domain in common. This is
+; equivalent to tagging them with !noalias !6 and !noalias !7, respectively:
%0 = load float, ptr %a, align 4, !alias.scope !4
store float %0, ptr %b, align 4, !alias.scope !5
@@ -14022,7 +14022,7 @@ This instruction requires several arguments:
```llvm
declare void @take_byval(ptr byval(i64))
declare void @take_ptr(ptr)
-
+
; Invalid (assuming @take_ptr dereferences the pointer), because %local
; may be de-allocated before the call to @take_ptr.
define void @invalid_alloca() {
@@ -14031,7 +14031,7 @@ This instruction requires several arguments:
tail call void @take_ptr(ptr %local)
ret void
}
-
+
; Valid, the byval attribute causes the memory allocated by %local to be
; copied into @take_byval's stack frame.
define void @byval_alloca() {
@@ -14040,7 +14040,7 @@ This instruction requires several arguments:
tail call void @take_byval(ptr byval(i64) %local)
ret void
}
-
+
; Invalid, because @use_global_va_list uses the variadic arguments from
; @invalid_va_list.
%struct.va_list = type { ptr }
@@ -14056,14 +14056,14 @@ This instruction requires several arguments:
tail call void @use_global_va_list()
ret void
}
-
+
; Valid, byval argument forwarded to tail call as another byval argument.
define void @forward_byval(ptr byval(i64) %x) {
entry:
tail call void @take_byval(ptr byval(i64) %x)
ret void
}
-
+
; Invalid (assuming @take_ptr dereferences the pointer), byval argument
; passed to tail callee as non-byval ptr.
define void @invalid_byval(ptr byval(i64) %x) {
diff --git a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
index 481b8cadbd397..997ac5e4abf92 100644
--- a/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
+++ b/llvm/include/llvm/Analysis/ScopedNoAliasAA.h
@@ -60,9 +60,9 @@ class ScopedNoAliasAAResult : public AAResultBase {
LLVM_ABI static bool mayAliasInScopes(const MDNode *Scopes,
const MDNode *NoAlias);
- /// Return false if two accesses in the scope lists \p Scopes1 and \p Scopes2
- /// are kept apart by the implicit noalias sets of a domain with disjoint
- /// scopes.
+ /// Return false if two accesses with scope lists \p Scopes1 and \p Scopes2
+ /// are kept apart because they use different scopes of a disjoint-scope
+ /// domain.
LLVM_ABI static bool mayAliasInDisjointDomains(const MDNode *Scopes1,
const MDNode *Scopes2);
};
diff --git a/llvm/include/llvm/IR/MDBuilder.h b/llvm/include/llvm/IR/MDBuilder.h
index 1b60fd7cb7306..1c296a59d74b6 100644
--- a/llvm/include/llvm/IR/MDBuilder.h
+++ b/llvm/include/llvm/IR/MDBuilder.h
@@ -182,12 +182,13 @@ class MDBuilder {
return createAnonymousAARoot();
}
- /// Return metadata appropriate for an alias scope domain node, whose scopes
- /// are disjoint if \p DisjointScopes is set.
+ /// Return metadata appropriate for an alias scope domain node, described by
+ /// \p Description, whose scopes are disjoint if \p DisjointScopes is set.
/// Each returned node is distinct from all other metadata and will never
/// be identified (uniqued) with anything else.
- LLVM_ABI MDNode *createAnonymousAliasScopeDomain(StringRef Name = StringRef(),
- bool DisjointScopes = false);
+ LLVM_ABI MDNode *
+ createAnonymousAliasScopeDomain(StringRef Description = StringRef(),
+ bool DisjointScopes = false);
/// Return metadata appropriate for an alias scope root node.
/// Each returned node is distinct from all other metadata and will never
diff --git a/llvm/lib/Analysis/ScopedNoAliasAA.cpp b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
index 5623bc2919388..7768e0943abcc 100644
--- a/llvm/lib/Analysis/ScopedNoAliasAA.cpp
+++ b/llvm/lib/Analysis/ScopedNoAliasAA.cpp
@@ -218,7 +218,7 @@ bool ScopedNoAliasAAResult::mayAliasInDisjointDomains(const MDNode *Scopes1,
SmallPtrSet<const MDNode *, 16> Domains;
collectScopedDomains(Scopes1, Domains, /*DisjointOnly=*/true);
- // The accesses don't alias if, for some domain, both accesses use at lesat
+ // The accesses don't alias if, for some domain, both accesses use at least
// one of its scopes and have no scopes in that domain in common.
for (const MDNode *Domain : Domains) {
SmallPtrSet<const MDNode *, 16> Nodes2;
diff --git a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
index 2aacd64d94da4..e62b882886337 100644
--- a/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
+++ b/llvm/lib/Bitcode/Reader/MetadataLoader.cpp
@@ -335,10 +335,12 @@ Metadata *BitcodeReaderMetadataList::resolveTypeArray(Metadata *MaybeTuple) {
return MDTuple::get(Context, Ops);
}
-/// Rebuild \p Old with \p Ops, keeping its identity: a self reference has to
-/// point at the replacement, and a distinct node must not be uniqued.
-static MDNode *rebuildAliasScopeNode(MDNode *Old,
- SmallVectorImpl<Metadata *> &Ops) {
+/// Rebuild the alias scope or domain \p Old with \p Ops, keeping its identity:
+/// a self reference has to point at the replacement, and a distinct node must
+/// not be uniqued. The first operand of both a scope and a domain is its name,
+/// which is either a string or a self reference.
+static MDNode *rebuildScopeOrDomainNode(MDNode *Old,
+ SmallVectorImpl<Metadata *> &Ops) {
LLVMContext &Context = Old->getContext();
if (Ops[0] != Old)
return Old->isDistinct() ? MDNode::getDistinct(Context, Ops)
@@ -359,7 +361,8 @@ static MDNode *upgradeAliasScopeDomain(MDNode *Domain,
(HadDescription && mdconst::hasa<ConstantInt>(Domain->getOperand(1))))
return Domain;
- if (MDNode *Upgrade = Upgraded.lookup(Domain))
+ MDNode *&Upgrade = Upgraded[Domain];
+ if (Upgrade)
return Upgrade;
LLVMContext &Context = Domain->getContext();
@@ -369,8 +372,7 @@ static MDNode *upgradeAliasScopeDomain(MDNode *Domain,
if (HadDescription)
Ops.push_back(Domain->getOperand(1));
- MDNode *Upgrade = rebuildAliasScopeNode(Domain, Ops);
- Upgraded[Domain] = Upgrade;
+ Upgrade = rebuildScopeOrDomainNode(Domain, Ops);
return Upgrade;
}
@@ -379,11 +381,7 @@ static MDNode *upgradeAliasScope(MDNode *Scope,
if (MDNode *Upgrade = Upgraded.lookup(Scope))
return Upgrade;
- auto *Domain = Scope->getNumOperands() >= 2
- ? dyn_cast_or_null<MDNode>(Scope->getOperand(1))
- : nullptr;
- if (!Domain)
- return Scope;
+ auto *Domain = cast<MDNode>(Scope->getOperand(1));
MDNode *UpgradedDomain = upgradeAliasScopeDomain(Domain, Upgraded);
if (UpgradedDomain == Domain)
@@ -391,7 +389,7 @@ static MDNode *upgradeAliasScope(MDNode *Scope,
SmallVector<Metadata *, 3> Ops(Scope->op_begin(), Scope->op_end());
Ops[1] = UpgradedDomain;
- MDNode *Upgrade = rebuildAliasScopeNode(Scope, Ops);
+ MDNode *Upgrade = rebuildScopeOrDomainNode(Scope, Ops);
Upgraded[Scope] = Upgrade;
return Upgrade;
}
diff --git a/llvm/lib/IR/MDBuilder.cpp b/llvm/lib/IR/MDBuilder.cpp
index 93314a2bdc0bb..d7631e84c7275 100644
--- a/llvm/lib/IR/MDBuilder.cpp
+++ b/llvm/lib/IR/MDBuilder.cpp
@@ -210,12 +210,12 @@ MDNode *MDBuilder::createAnonymousAARoot(StringRef Name, MDNode *Extra) {
return Root;
}
-MDNode *MDBuilder::createAnonymousAliasScopeDomain(StringRef Name,
+MDNode *MDBuilder::createAnonymousAliasScopeDomain(StringRef Description,
bool DisjointScopes) {
SmallVector<Metadata *, 3> Args = {
nullptr, createConstant(ConstantInt::getBool(Context, DisjointScopes))};
- if (!Name.empty())
- Args.push_back(createString(Name));
+ if (!Description.empty())
+ Args.push_back(createString(Description));
MDNode *Domain = MDNode::getDistinct(Context, Args);
// Replace the reserved operand with the domain node itself, as is done for
>From 2d535d971bb6d4e51ad0dcdf40e856d61ea17703 Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Mon, 28 Sep 2026 19:55:42 +0000
Subject: [PATCH 8/9] Test fixes
---
llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll | 4 ++--
llvm/test/Transforms/LoopVectorize/metadata.ll | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
index 0ba0ca8f98511..01e4b176063a4 100644
--- a/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
+++ b/llvm/test/CodeGen/AMDGPU/lower-lds-struct-aa-merge.ll
@@ -12,8 +12,8 @@ define amdgpu_kernel void @no_clobber_ds_load_stores_x2_preexisting_aa(ptr addrs
; CHECK-NEXT: store i32 1, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, align 16, !tbaa [[TBAA1:![0-9]+]], !noalias [[META6:![0-9]+]]
; CHECK-NEXT: [[GEP_A:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 [[I]]
; CHECK-NEXT: [[VAL_A:%.*]] = load i32, ptr addrspace(3) [[GEP_A]], align 4, !tbaa [[TBAA1]], !noalias [[META6]]
-; CHECK-NEXT: store i32 2, ptr addrspace(3) getelementptr inbounds ([[LLVM_AMDGCN_KERNEL_NO_CLOBBER_DS_LOAD_STORES_X2_PREEXISTING_AA_LDS_T:%.*]], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 1), align 16, !tbaa [[TBAA1]], !noalias [[META11:![0-9]+]]
-; CHECK-NEXT: [[GEP_B:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) getelementptr inbounds ([[LLVM_AMDGCN_KERNEL_NO_CLOBBER_DS_LOAD_STORES_X2_PREEXISTING_AA_LDS_T]], ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 0, i32 1), i32 0, i32 [[I]]
+; CHECK-NEXT: store i32 2, ptr addrspace(3) getelementptr inbounds (i8, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 256), align 16, !tbaa [[TBAA1]], !noalias [[META11:![0-9]+]]
+; CHECK-NEXT: [[GEP_B:%.*]] = getelementptr inbounds [64 x i32], ptr addrspace(3) getelementptr inbounds (i8, ptr addrspace(3) @llvm.amdgcn.kernel.no_clobber_ds_load_stores_x2_preexisting_aa.lds, i32 256), i32 0, i32 [[I]]
; CHECK-NEXT: [[VAL_B:%.*]] = load i32, ptr addrspace(3) [[GEP_B]], align 4, !tbaa [[TBAA1]], !noalias [[META11]]
; CHECK-NEXT: [[VAL:%.*]] = add i32 [[VAL_A]], [[VAL_B]]
; CHECK-NEXT: store i32 [[VAL]], ptr addrspace(1) [[ARG]], align 4
diff --git a/llvm/test/Transforms/LoopVectorize/metadata.ll b/llvm/test/Transforms/LoopVectorize/metadata.ll
index 7fb8a5542bfef..f453bb4c88962 100644
--- a/llvm/test/Transforms/LoopVectorize/metadata.ll
+++ b/llvm/test/Transforms/LoopVectorize/metadata.ll
@@ -631,7 +631,7 @@ attributes #1 = { nounwind "vector-function-abi-variant"="_ZGV_LLVM_N2v_bar(bar_
!3 = !{!7, !7, i64 0, i64 0}
!4 = !{!5}
!5 = distinct !{!5, !6, !"g1"}
-!6 = distinct !{!6, i11 false, !"t2"}
+!6 = distinct !{!6, i1 false, !"t2"}
!7 = !{!"omnipotent char", !2}
;.
>From fc65255c9f07829347818f5c9835f0132e3e7b1c Mon Sep 17 00:00:00 2001
From: Krzysztof Drewniak <Krzysztof.Drewniak at amd.com>
Date: Mon, 28 Sep 2026 21:15:42 +0000
Subject: [PATCH 9/9] Review feedback
---
llvm/include/llvm/IR/Metadata.h | 4 +-
llvm/include/llvm/Transforms/Utils/Cloning.h | 4 +-
llvm/lib/IR/AutoUpgrade.cpp | 1 -
.../InstCombine/InstructionCombining.cpp | 84 ++++++++++++-------
llvm/lib/Transforms/Utils/CloneFunction.cpp | 30 +++----
.../noalias-scope-decl-disjoint-domain.ll | 31 +++++--
mlir/lib/Target/LLVMIR/ModuleImport.cpp | 7 +-
7 files changed, 105 insertions(+), 56 deletions(-)
diff --git a/llvm/include/llvm/IR/Metadata.h b/llvm/include/llvm/IR/Metadata.h
index 0687ba4901242..0e67845dd0219 100644
--- a/llvm/include/llvm/IR/Metadata.h
+++ b/llvm/include/llvm/IR/Metadata.h
@@ -1610,7 +1610,9 @@ class AliasScopeDomainNode {
/// Get the MDNode for this AliasScopeDomainNode.
const MDNode *getNode() const { return Node; }
- StringRef getName() const {
+ /// Get the optional human-readable description of this domain or the empty
+ /// string otherwise.
+ StringRef getDescription() const {
if (Node->getNumOperands() > 2)
if (MDString *N = dyn_cast_or_null<MDString>(Node->getOperand(2)))
return N->getString();
diff --git a/llvm/include/llvm/Transforms/Utils/Cloning.h b/llvm/include/llvm/Transforms/Utils/Cloning.h
index 354210ce3695f..119084eea7238 100644
--- a/llvm/include/llvm/Transforms/Utils/Cloning.h
+++ b/llvm/include/llvm/Transforms/Utils/Cloning.h
@@ -419,7 +419,9 @@ identifyNoAliasScopesToClone(BasicBlock::iterator Start,
/// The 'Ext' string is added as an extension to the name.
/// Afterwards, the ClonedScopes contains the mapping of the original scope
/// MDNode onto the cloned scope.
-/// Be aware that the cloned scopes are still part of the original scope domain.
+/// Be aware that the cloned scopes are still part of the original scope domain,
+/// unless that domain has disjoint scopes, in which case they are placed in a
+/// clone of the domain.
LLVM_ABI void cloneNoAliasScopes(ArrayRef<MDNode *> NoAliasDeclScopes,
DenseMap<MDNode *, MDNode *> &ClonedScopes,
StringRef Ext, LLVMContext &Context);
diff --git a/llvm/lib/IR/AutoUpgrade.cpp b/llvm/lib/IR/AutoUpgrade.cpp
index b943680dade25..c4e4df7ace8b1 100644
--- a/llvm/lib/IR/AutoUpgrade.cpp
+++ b/llvm/lib/IR/AutoUpgrade.cpp
@@ -28,7 +28,6 @@
#include "llvm/IR/Function.h"
#include "llvm/IR/GlobalValue.h"
#include "llvm/IR/IRBuilder.h"
-#include "llvm/IR/InstIterator.h"
#include "llvm/IR/InstVisitor.h"
#include "llvm/IR/Instruction.h"
#include "llvm/IR/IntrinsicInst.h"
diff --git a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
index 54d3edab56e09..5079b81892464 100644
--- a/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
@@ -37,6 +37,7 @@
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/ArrayRef.h"
#include "llvm/ADT/DenseMap.h"
+#include "llvm/ADT/SetOperations.h"
#include "llvm/ADT/SmallPtrSet.h"
#include "llvm/ADT/SmallVector.h"
#include "llvm/ADT/Statistic.h"
@@ -5980,10 +5981,42 @@ bool InstCombinerImpl::run() {
class AliasScopeTracker {
SmallPtrSet<const MDNode *, 8> UsedAliasScopesAndLists;
SmallPtrSet<const MDNode *, 8> UsedNoAliasScopesAndLists;
- // The domains with disjoint scopes of which more than one scope is used by
- // !alias.scope, along with the first such scope seen for each domain.
- SmallDenseMap<const MDNode *, const MDNode *, 4> FirstScopeInDisjointDomain;
- SmallPtrSet<const MDNode *, 4> UsedDisjointDomains;
+ // Scopes used by every !alias.scope list that scopes from a disjoint-scope
+ // domain appears in. This is used to catch scopes that don't actually make
+ // anything noalias.
+ SmallDenseMap<const MDNode *, SmallPtrSet<const MDNode *, 4>, 4>
+ CommonScopesOfDisjointDomain;
+
+ // Record, for each disjoint-scope domain \p ScopeList uses, which of its
+ // scopes are used by \p ScopeList, adding to a running intersection.
+ void recordDisjointDomainScopes(const MDNode *ScopeList) {
+ SmallDenseMap<const MDNode *, SmallPtrSet<const MDNode *, 4>, 4> UsedScopes;
+ for (const MDOperand &MDOperand : ScopeList->operands()) {
+ const auto *MDScope = dyn_cast<MDNode>(MDOperand);
+ if (!MDScope)
+ continue;
+ const MDNode *Domain = AliasScopeNode(MDScope).getDomain();
+ if (AliasScopeDomainNode(Domain).hasDisjointScopes())
+ UsedScopes[Domain].insert(MDScope);
+ }
+
+ for (auto &[Domain, Scopes] : UsedScopes) {
+ auto [It, Inserted] =
+ CommonScopesOfDisjointDomain.try_emplace(Domain, Scopes);
+ if (!Inserted)
+ llvm::set_intersect(It->second, Scopes);
+ }
+ }
+
+ // Return true if \p Scope is on the implicit !noalias list of one of the
+ // analysed accesses, that is, if it belongs to a disjoint-scope domain and
+ // some access uses that domain without using \p Scope.
+ bool isImplicitlyNoAlias(const MDNode *Scope) const {
+ auto It =
+ CommonScopesOfDisjointDomain.find(AliasScopeNode(Scope).getDomain());
+ return It != CommonScopesOfDisjointDomain.end() &&
+ !It->second.contains(Scope);
+ }
public:
void analyse(Instruction *I) {
@@ -5991,29 +6024,21 @@ class AliasScopeTracker {
if (!I->hasMetadataOtherThanDebugLoc())
return;
- auto Track = [](Metadata *ScopeList, auto &Container, auto OnScope) {
+ auto Track = [](Metadata *ScopeList, auto &Container) -> const MDNode * {
const auto *MDScopeList = dyn_cast_or_null<MDNode>(ScopeList);
if (!MDScopeList || !Container.insert(MDScopeList).second)
- return;
+ return nullptr;
for (const auto &MDOperand : MDScopeList->operands())
- if (auto *MDScope = dyn_cast<MDNode>(MDOperand)) {
+ if (auto *MDScope = dyn_cast<MDNode>(MDOperand))
Container.insert(MDScope);
- OnScope(MDScope);
- }
+ return MDScopeList;
};
- Track(I->getMetadata(LLVMContext::MD_alias_scope), UsedAliasScopesAndLists,
- [this](const MDNode *MDScope) {
- const MDNode *Domain = AliasScopeNode(MDScope).getDomain();
- if (!Domain || !AliasScopeDomainNode(Domain).hasDisjointScopes())
- return;
- auto [It, Inserted] =
- FirstScopeInDisjointDomain.try_emplace(Domain, MDScope);
- if (!Inserted && It->second != MDScope)
- UsedDisjointDomains.insert(Domain);
- });
- Track(I->getMetadata(LLVMContext::MD_noalias), UsedNoAliasScopesAndLists,
- [](const MDNode *) {});
+ if (const MDNode *AliasScopeList =
+ Track(I->getMetadata(LLVMContext::MD_alias_scope),
+ UsedAliasScopesAndLists))
+ recordDisjointDomainScopes(AliasScopeList);
+ Track(I->getMetadata(LLVMContext::MD_noalias), UsedNoAliasScopesAndLists);
}
bool isNoAliasScopeDeclDead(Instruction *Inst) {
@@ -6027,16 +6052,13 @@ class AliasScopeTracker {
assert(MDSL->getNumOperands() == 1 &&
"llvm.experimental.noalias.scope should refer to a single scope");
auto &MDOperand = MDSL->getOperand(0);
- if (auto *MD = dyn_cast<MDNode>(MDOperand)) {
- if (!UsedAliasScopesAndLists.contains(MD))
- return true;
- // A scope of a domain with disjoint scopes carries an implicit noalias
- // set, so its declaration matters without a noalias use as long as some
- // other scope of that domain is used as well.
- if (UsedDisjointDomains.contains(AliasScopeNode(MD).getDomain()))
- return false;
- return !UsedNoAliasScopesAndLists.contains(MD);
- }
+ // A scope is relevant if it appears in an !alias.scope list, and either it
+ // appears in a !noalias list, or it is on the implicit !noalias list of
+ // some access using its disjoint-scope domain.
+ if (auto *MD = dyn_cast<MDNode>(MDOperand))
+ return !UsedAliasScopesAndLists.contains(MD) ||
+ (!UsedNoAliasScopesAndLists.contains(MD) &&
+ !isImplicitlyNoAlias(MD));
// Not an MDNode ? throw away.
return true;
diff --git a/llvm/lib/Transforms/Utils/CloneFunction.cpp b/llvm/lib/Transforms/Utils/CloneFunction.cpp
index d64ba932ba42d..ca819ede2e1ee 100644
--- a/llvm/lib/Transforms/Utils/CloneFunction.cpp
+++ b/llvm/lib/Transforms/Utils/CloneFunction.cpp
@@ -1156,19 +1156,7 @@ void llvm::cloneNoAliasScopes(ArrayRef<MDNode *> NoAliasDeclScopes,
StringRef Ext, LLVMContext &Context) {
MDBuilder MDB(Context);
- // A cloned scope has to go into a clone of its domain if that domain has
- // disjoint scopes: the copies of a duplicated access are in the same memory
- // region, so they must not become implicitly noalias with each other.
DenseMap<const MDNode *, MDNode *> ClonedDomains;
- auto GetClonedDomain = [&](const MDNode *Domain) {
- if (!Domain || !AliasScopeDomainNode(Domain).hasDisjointScopes())
- return const_cast<MDNode *>(Domain);
- MDNode *&ClonedDomain = ClonedDomains[Domain];
- if (!ClonedDomain)
- ClonedDomain = MDB.createAnonymousAliasScopeDomain(
- AliasScopeDomainNode(Domain).getName(), /*DisjointScopes=*/true);
- return ClonedDomain;
- };
for (MDNode *ScopeList : NoAliasDeclScopes) {
for (const MDOperand &MDOp : ScopeList->operands()) {
@@ -1182,8 +1170,22 @@ void llvm::cloneNoAliasScopes(ArrayRef<MDNode *> NoAliasDeclScopes,
else
Name = std::string(Ext);
- MDNode *NewScope = MDB.createAnonymousAliasScope(
- GetClonedDomain(SNANode.getDomain()), Name);
+ // A cloned scope has to go into a clone of its domain if that domain
+ // has disjoint scopes: the copies of a duplicated access are in the
+ // same memory region, so they must not become implicitly noalias with
+ // each other.
+ const MDNode *Domain = SNANode.getDomain();
+ MDNode *NewDomain = const_cast<MDNode *>(Domain);
+ if (AliasScopeDomainNode(Domain).hasDisjointScopes()) {
+ MDNode *&ClonedDomain = ClonedDomains[Domain];
+ if (!ClonedDomain)
+ ClonedDomain = MDB.createAnonymousAliasScopeDomain(
+ AliasScopeDomainNode(Domain).getDescription(),
+ /*DisjointScopes=*/true);
+ NewDomain = ClonedDomain;
+ }
+
+ MDNode *NewScope = MDB.createAnonymousAliasScope(NewDomain, Name);
ClonedScopes.insert(std::make_pair(MD, NewScope));
}
}
diff --git a/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll b/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
index 20bd94bdf221f..3272808feea08 100644
--- a/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
+++ b/llvm/test/Transforms/InstCombine/noalias-scope-decl-disjoint-domain.ll
@@ -52,12 +52,27 @@ define void @declared_scope_of_disjoint_domain_unused(ptr %ptr0, ptr %ptr1) {
ret void
}
-define void @two_scopes_of_plain_domain_used(ptr %ptr0, ptr %ptr1) {
-; CHECK-LABEL: define void @two_scopes_of_plain_domain_used(
+define void @scope_used_by_every_list_of_disjoint_domain(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @scope_used_by_every_list_of_disjoint_domain(
; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: call void @llvm.experimental.noalias.scope.decl(metadata [[META3]])
; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META8:![0-9]+]]
; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META9:![0-9]+]]
; CHECK-NEXT: ret void
+;
+ call void @llvm.experimental.noalias.scope.decl(metadata !0)
+ call void @llvm.experimental.noalias.scope.decl(metadata !3)
+ store i8 42, ptr %ptr0, !alias.scope !13
+ store i8 43, ptr %ptr1, !alias.scope !14
+ ret void
+}
+
+define void @two_scopes_of_plain_domain_used(ptr %ptr0, ptr %ptr1) {
+; CHECK-LABEL: define void @two_scopes_of_plain_domain_used(
+; CHECK-SAME: ptr [[PTR0:%.*]], ptr [[PTR1:%.*]]) {
+; CHECK-NEXT: store i8 42, ptr [[PTR0]], align 1, !alias.scope [[META11:![0-9]+]]
+; CHECK-NEXT: store i8 43, ptr [[PTR1]], align 1, !alias.scope [[META12:![0-9]+]]
+; CHECK-NEXT: ret void
;
call void @llvm.experimental.noalias.scope.decl(metadata !10)
store i8 42, ptr %ptr0, !alias.scope !10
@@ -80,6 +95,9 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
!10 = !{!6}
!11 = !{!12}
!12 = distinct !{!12, !7}
+!13 = !{!1, !4}
+!14 = !{!1, !15}
+!15 = distinct !{!15, !2}
;.
; CHECK: [[META0]] = !{[[META1:![0-9]+]]}
; CHECK: [[META1]] = distinct !{[[META1]], [[META2:![0-9]+]]}
@@ -89,7 +107,10 @@ declare void @llvm.experimental.noalias.scope.decl(metadata)
; CHECK: [[META5]] = !{[[META1]], [[META6:![0-9]+]]}
; CHECK: [[META6]] = distinct !{[[META6]], [[META7:![0-9]+]]}
; CHECK: [[META7]] = distinct !{[[META7]], i1 false}
-; CHECK: [[META8]] = !{[[META6]]}
-; CHECK: [[META9]] = !{[[META10:![0-9]+]]}
-; CHECK: [[META10]] = distinct !{[[META10]], [[META7]]}
+; CHECK: [[META8]] = !{[[META1]], [[META4]]}
+; CHECK: [[META9]] = !{[[META1]], [[META10:![0-9]+]]}
+; CHECK: [[META10]] = distinct !{[[META10]], [[META2]]}
+; CHECK: [[META11]] = !{[[META6]]}
+; CHECK: [[META12]] = !{[[META13:![0-9]+]]}
+; CHECK: [[META13]] = distinct !{[[META13]], [[META7]]}
;.
diff --git a/mlir/lib/Target/LLVMIR/ModuleImport.cpp b/mlir/lib/Target/LLVMIR/ModuleImport.cpp
index cf8a062d40138..cadcd22dd2412 100644
--- a/mlir/lib/Target/LLVMIR/ModuleImport.cpp
+++ b/mlir/lib/Target/LLVMIR/ModuleImport.cpp
@@ -577,9 +577,10 @@ ModuleImport::processAliasScopeMetadata(const llvm::MDNode *node) {
// Helper that creates an alias scope domain attribute.
auto createAliasScopeDomainOp = [&](const llvm::MDNode *aliasDomain) {
StringAttr description = nullptr;
- StringRef name = llvm::AliasScopeDomainNode(aliasDomain).getName();
- if (!name.empty())
- description = builder.getStringAttr(name);
+ StringRef descriptionStr =
+ llvm::AliasScopeDomainNode(aliasDomain).getDescription();
+ if (!descriptionStr.empty())
+ description = builder.getStringAttr(descriptionStr);
Attribute idAttr = getIdAttr(aliasDomain);
return builder.getAttr<AliasScopeDomainAttr>(idAttr, description);
};
More information about the llvm-commits
mailing list