[Mlir-commits] [clang] [llvm] [mlir] [Draft] Enforce single-operand node for distribute.enable (PR #192456)
llvmlistbot at llvm.org
llvmlistbot at llvm.org
Thu Apr 16 06:53:09 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-mlir-llvm
Author: Madhur Amilkanthwar (madhur13490)
<details>
<summary>Changes</summary>
This patch is prepared as a POC for RFC.
---
Patch is 28.13 KiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/192456.diff
34 Files Affected:
- (modified) clang/lib/CodeGen/CGLoopInfo.cpp (+11-11)
- (modified) clang/test/CodeGenCXX/pragma-followup_inner.cpp (+1-1)
- (modified) clang/test/CodeGenCXX/pragma-followup_outer.cpp (+1-1)
- (modified) clang/test/CodeGenCXX/pragma-loop-distribute.cpp (+1-1)
- (modified) clang/test/CodeGenCXX/pragma-loop.cpp (+1-1)
- (modified) llvm/docs/LangRef.rst (+7-8)
- (modified) llvm/lib/Analysis/LoopAccessAnalysis.cpp (+3-8)
- (modified) llvm/lib/Transforms/Scalar/LoopDistribute.cpp (+5-8)
- (modified) llvm/lib/Transforms/Utils/LoopConstrainer.cpp (+2-1)
- (modified) llvm/lib/Transforms/Utils/LoopUtils.cpp (+3)
- (modified) llvm/test/Analysis/LoopAccessAnalysis/pr64637.ll (+1-1)
- (modified) llvm/test/Other/optimization-remarks-lazy-bfi.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/correct-loop-info.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/loop-guarded-bounds.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/pre_post_loops.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/range_intersect_miscompile.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/unsigned_comparisons_ugt.ll (+1-1)
- (modified) llvm/test/Transforms/IRCE/unsigned_comparisons_ult.ll (+1-1)
- (modified) llvm/test/Transforms/Inline/dilocation-loop-metadata-update.ll (+2-2)
- (modified) llvm/test/Transforms/LoopDistribute/basic-with-memchecks.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/diagnostics.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/disable_nonforced_enable.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/early-exit.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/followup.ll (+1-1)
- (modified) llvm/test/Transforms/LoopDistribute/metadata.ll (+2-2)
- (modified) llvm/test/Transforms/LoopSimplify/preserve-llvm-loop-metadata.ll (+2-2)
- (modified) llvm/test/Transforms/SimplifyCFG/preserve-llvm-loop-metadata.ll (+2-2)
- (modified) llvm/unittests/Analysis/LoopInfoTest.cpp (+4-4)
- (modified) mlir/lib/Target/LLVMIR/LoopAnnotationImporter.cpp (+4-2)
- (modified) mlir/lib/Target/LLVMIR/LoopAnnotationTranslation.cpp (+6-1)
- (modified) mlir/test/Target/LLVMIR/Import/metadata-loop.ll (+1-1)
- (modified) mlir/test/Target/LLVMIR/loop-metadata.mlir (+1-1)
``````````diff
diff --git a/clang/lib/CodeGen/CGLoopInfo.cpp b/clang/lib/CodeGen/CGLoopInfo.cpp
index 369b052bf7a28..8961db50f9f84 100644
--- a/clang/lib/CodeGen/CGLoopInfo.cpp
+++ b/clang/lib/CodeGen/CGLoopInfo.cpp
@@ -334,11 +334,12 @@ LoopInfo::createLoopDistributeMetadata(const LoopAttributes &Attrs,
if (Enabled != true) {
SmallVector<Metadata *, 4> NewLoopProperties;
if (Enabled == false) {
- NewLoopProperties.append(LoopProperties.begin(), LoopProperties.end());
- NewLoopProperties.push_back(
- MDNode::get(Ctx, {MDString::get(Ctx, "llvm.loop.distribute.enable"),
- ConstantAsMetadata::get(ConstantInt::get(
- llvm::Type::getInt1Ty(Ctx), 0))}));
+ NewLoopProperties.append(
+ LoopProperties.begin(), LoopProperties.end());
+ NewLoopProperties.push_back(MDNode::get(
+ Ctx,
+ {MDString::get(
+ Ctx, "llvm.loop.distribute.disable")}));
LoopProperties = NewLoopProperties;
}
return createLoopVectorizeMetadata(Attrs, LoopProperties,
@@ -347,16 +348,15 @@ LoopInfo::createLoopDistributeMetadata(const LoopAttributes &Attrs,
bool FollowupHasTransforms = false;
SmallVector<Metadata *, 4> Followup =
- createLoopVectorizeMetadata(Attrs, LoopProperties, FollowupHasTransforms);
+ createLoopVectorizeMetadata(
+ Attrs, LoopProperties, FollowupHasTransforms);
SmallVector<Metadata *, 4> Args;
Args.append(LoopProperties.begin(), LoopProperties.end());
- Metadata *Vals[] = {MDString::get(Ctx, "llvm.loop.distribute.enable"),
- ConstantAsMetadata::get(ConstantInt::get(
- llvm::Type::getInt1Ty(Ctx),
- (Attrs.DistributeEnable == LoopAttributes::Enable)))};
- Args.push_back(MDNode::get(Ctx, Vals));
+ Args.push_back(MDNode::get(
+ Ctx,
+ {MDString::get(Ctx, "llvm.loop.distribute.enable")}));
if (FollowupHasTransforms)
Args.push_back(
diff --git a/clang/test/CodeGenCXX/pragma-followup_inner.cpp b/clang/test/CodeGenCXX/pragma-followup_inner.cpp
index 04f5656dcd638..2cf2dba5b913d 100644
--- a/clang/test/CodeGenCXX/pragma-followup_inner.cpp
+++ b/clang/test/CodeGenCXX/pragma-followup_inner.cpp
@@ -22,7 +22,7 @@ extern "C" void followup_inner(int n, int *x) {
// CHECK-DAG: ![[INNERLOOP_3]] = distinct !{![[INNERLOOP_3]], ![[PARALLEL_ACCESSES_4:[0-9]+]], ![[DISTRIBUTE_5:[0-9]+]], ![[DISTRIBUTE_FOLLOWUP_6:[0-9]+]]}
// CHECK-DAG: ![[PARALLEL_ACCESSES_4]] = !{!"llvm.loop.parallel_accesses", ![[ACCESSGROUP_2]]}
-// CHECK-DAG: ![[DISTRIBUTE_5]] = !{!"llvm.loop.distribute.enable", i1 true}
+// CHECK-DAG: ![[DISTRIBUTE_5]] = !{!"llvm.loop.distribute.enable"}
// CHECK-DAG: ![[DISTRIBUTE_FOLLOWUP_6]] = !{!"llvm.loop.distribute.followup_all", ![[PARALLEL_ACCESSES_4]], ![[VECTORIZE_8:[0-9]+]]}
// CHECK-DAG: ![[VECTORIZE_8]] = !{!"llvm.loop.vectorize.enable", i1 true}
diff --git a/clang/test/CodeGenCXX/pragma-followup_outer.cpp b/clang/test/CodeGenCXX/pragma-followup_outer.cpp
index fdd5a07d00857..2e907fb814b3d 100644
--- a/clang/test/CodeGenCXX/pragma-followup_outer.cpp
+++ b/clang/test/CodeGenCXX/pragma-followup_outer.cpp
@@ -19,7 +19,7 @@ extern "C" void followup_outer(int n, int *x) {
// CHECK-DAG: ![[LOOP_3:[0-9]+]] = distinct !{![[LOOP_3:[0-9]+]], [[MP:![0-9]+]], ![[PARALLEL_ACCESSES_4:[0-9]+]], ![[DISTRIBUTE_5:[0-9]+]], ![[DISTRIBUTE_FOLLOWUP_6:[0-9]+]]}
// CHECK-DAG: ![[PARALLEL_ACCESSES_4:[0-9]+]] = !{!"llvm.loop.parallel_accesses", ![[ACCESSGROUP_2]]}
-// CHECK-DAG: ![[DISTRIBUTE_5:[0-9]+]] = !{!"llvm.loop.distribute.enable", i1 true}
+// CHECK-DAG: ![[DISTRIBUTE_5:[0-9]+]] = !{!"llvm.loop.distribute.enable"}
// CHECK-DAG: ![[DISTRIBUTE_FOLLOWUP_6:[0-9]+]] = !{!"llvm.loop.distribute.followup_all", [[MP]], ![[PARALLEL_ACCESSES_4:[0-9]+]], ![[VECTORIZE_8:[0-9]+]], ![[VECTORIZE_FOLLOWUP_9:[0-9]+]]}
// CHECK-DAG: ![[VECTORIZE_8:[0-9]+]] = !{!"llvm.loop.vectorize.enable", i1 true}
diff --git a/clang/test/CodeGenCXX/pragma-loop-distribute.cpp b/clang/test/CodeGenCXX/pragma-loop-distribute.cpp
index 98aef21da2acd..66f0fb07b51fb 100644
--- a/clang/test/CodeGenCXX/pragma-loop-distribute.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop-distribute.cpp
@@ -20,5 +20,5 @@ void while_test(int *List, int Length, int *List2, int Length2) {
}
// CHECK: ![[LOOP_1]] = distinct !{![[LOOP_1]], [[MP:![0-9]+]], ![[DISTRIBUTE_ENABLE:.*]]}
-// CHECK: ![[DISTRIBUTE_ENABLE]] = !{!"llvm.loop.distribute.enable", i1 true}
+// CHECK: ![[DISTRIBUTE_ENABLE]] = !{!"llvm.loop.distribute.enable"}
// CHECK: [[LOOP_2]] = distinct !{[[LOOP_2]], [[MP]]}
diff --git a/clang/test/CodeGenCXX/pragma-loop.cpp b/clang/test/CodeGenCXX/pragma-loop.cpp
index 8cb3346247daf..f9106725ad99d 100644
--- a/clang/test/CodeGenCXX/pragma-loop.cpp
+++ b/clang/test/CodeGenCXX/pragma-loop.cpp
@@ -248,7 +248,7 @@ void for_test_interleave_vectorize_disable_unroll(int *List, int Length) {
// CHECK-DAG: ![[UNROLL_32:[0-9]+]] = !{!"llvm.loop.unroll.count", i32 32}
// CHECK-DAG: ![[UNROLL_FULL:[0-9]+]] = !{!"llvm.loop.unroll.full"}
-// CHECK-DAG: ![[DISTRIBUTE_DISABLE:[0-9]+]] = !{!"llvm.loop.distribute.enable", i1 false}
+// CHECK-DAG: ![[DISTRIBUTE_DISABLE:[0-9]+]] = !{!"llvm.loop.distribute.disable"}
// CHECK-DAG: ![[INTERLEAVE_2:[0-9]+]] = !{!"llvm.loop.interleave.count", i32 2}
// CHECK-DAG: ![[INTERLEAVE_4:[0-9]+]] = !{!"llvm.loop.interleave.count", i32 4}
diff --git a/llvm/docs/LangRef.rst b/llvm/docs/LangRef.rst
index 86325ef731381..bfd1d70e49ad1 100644
--- a/llvm/docs/LangRef.rst
+++ b/llvm/docs/LangRef.rst
@@ -8128,18 +8128,17 @@ this is only performed if the entire loop cannot be vectorized due to unsafe
memory dependencies. The transformation will attempt to isolate the unsafe
dependencies into their own loop.
-This metadata can be used to selectively enable or disable distribution of the
-loop. The first operand is the string ``llvm.loop.distribute.enable`` and the
-second operand is a bit. If the bit operand value is 1 distribution is
-enabled. A value of 0 disables distribution:
+This metadata can be used to selectively enable or disable
+distribution of the loop. Each node has a single operand
+containing the name string:
.. code-block:: llvm
- !0 = !{!"llvm.loop.distribute.enable", i1 0}
- !1 = !{!"llvm.loop.distribute.enable", i1 1}
+ !0 = !{!"llvm.loop.distribute.enable"}
+ !1 = !{!"llvm.loop.distribute.disable"}
-This metadata should be used in conjunction with ``llvm.loop`` loop
-identification metadata.
+This metadata should be used in conjunction with ``llvm.loop``
+loop identification metadata.
'``llvm.loop.distribute.followup_coincident``' Metadata
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/llvm/lib/Analysis/LoopAccessAnalysis.cpp b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
index 2b9efd22131c6..ca5354930b018 100644
--- a/llvm/lib/Analysis/LoopAccessAnalysis.cpp
+++ b/llvm/lib/Analysis/LoopAccessAnalysis.cpp
@@ -2901,14 +2901,9 @@ void LoopAccessInfo::emitUnsafeDependenceRemark() {
LLVM_DEBUG(dbgs() << "LAA: unsafe dependent memory operations in loop\n");
// Emit remark for first unsafe dependence
- bool HasForcedDistribution = false;
- std::optional<const MDOperand *> Value =
- findStringMetadataForLoop(TheLoop, "llvm.loop.distribute.enable");
- if (Value) {
- const MDOperand *Op = *Value;
- assert(Op && mdconst::hasa<ConstantInt>(*Op) && "invalid metadata");
- HasForcedDistribution = mdconst::extract<ConstantInt>(*Op)->getZExtValue();
- }
+ bool HasForcedDistribution =
+ getBooleanLoopAttribute(
+ TheLoop, "llvm.loop.distribute.enable");
const std::string Info =
HasForcedDistribution
diff --git a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
index 00eac14845c57..006cc43de3ca5 100644
--- a/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
+++ b/llvm/lib/Transforms/Scalar/LoopDistribute.cpp
@@ -938,14 +938,11 @@ class LoopDistributeForLoop {
/// Check whether the loop metadata is forcing distribution to be
/// enabled/disabled.
void setForced() {
- std::optional<const MDOperand *> Value =
- findStringMetadataForLoop(L, "llvm.loop.distribute.enable");
- if (!Value)
- return;
-
- const MDOperand *Op = *Value;
- assert(Op && mdconst::hasa<ConstantInt>(*Op) && "invalid metadata");
- IsForced = mdconst::extract<ConstantInt>(*Op)->getZExtValue();
+ if (getBooleanLoopAttribute(L, "llvm.loop.distribute.enable"))
+ IsForced = true;
+ else if (getBooleanLoopAttribute(
+ L, "llvm.loop.distribute.disable"))
+ IsForced = false;
}
Loop *L;
diff --git a/llvm/lib/Transforms/Utils/LoopConstrainer.cpp b/llvm/lib/Transforms/Utils/LoopConstrainer.cpp
index 72fae62e56e88..74cd2a729d285 100644
--- a/llvm/lib/Transforms/Utils/LoopConstrainer.cpp
+++ b/llvm/lib/Transforms/Utils/LoopConstrainer.cpp
@@ -453,7 +453,8 @@ static void DisableAllLoopOptsOnLoop(Loop &L) {
Context, {MDString::get(Context, "llvm.loop.licm_versioning.disable")});
MDNode *DisableDistribution = MDNode::get(
Context,
- {MDString::get(Context, "llvm.loop.distribute.enable"), FalseVal});
+ {MDString::get(
+ Context, "llvm.loop.distribute.disable")});
MDNode *NewLoopID =
MDNode::get(Context, {Dummy, DisableUnroll, DisableVectorize,
DisableLICMVersioning, DisableDistribution});
diff --git a/llvm/lib/Transforms/Utils/LoopUtils.cpp b/llvm/lib/Transforms/Utils/LoopUtils.cpp
index 7573467917c73..290bd73fa2c18 100644
--- a/llvm/lib/Transforms/Utils/LoopUtils.cpp
+++ b/llvm/lib/Transforms/Utils/LoopUtils.cpp
@@ -429,6 +429,9 @@ TransformationMode llvm::hasVectorizeTransformation(const Loop *L) {
}
TransformationMode llvm::hasDistributeTransformation(const Loop *L) {
+ if (getBooleanLoopAttribute(L, "llvm.loop.distribute.disable"))
+ return TM_SuppressedByUser;
+
if (getBooleanLoopAttribute(L, "llvm.loop.distribute.enable"))
return TM_ForcedByUser;
diff --git a/llvm/test/Analysis/LoopAccessAnalysis/pr64637.ll b/llvm/test/Analysis/LoopAccessAnalysis/pr64637.ll
index d3e589cf99cf3..7b25d1fffcbba 100644
--- a/llvm/test/Analysis/LoopAccessAnalysis/pr64637.ll
+++ b/llvm/test/Analysis/LoopAccessAnalysis/pr64637.ll
@@ -76,4 +76,4 @@ for.body: ; preds = %for.body, %for.body
}
!0 = distinct !{!0, !1}
-!1 = !{!"llvm.loop.distribute.enable", i1 true}
+!1 = !{!"llvm.loop.distribute.enable"}
diff --git a/llvm/test/Other/optimization-remarks-lazy-bfi.ll b/llvm/test/Other/optimization-remarks-lazy-bfi.ll
index c5099bb2179e4..5fc34cc14bdc8 100644
--- a/llvm/test/Other/optimization-remarks-lazy-bfi.ll
+++ b/llvm/test/Other/optimization-remarks-lazy-bfi.ll
@@ -75,7 +75,7 @@ for.cond.cleanup:
!18 = !DILocation(line: 4, column: 5, scope: !7)
!19 = !DILocation(line: 4, column: 10, scope: !7)
!20 = distinct !{!20, !21}
-!21 = !{!"llvm.loop.distribute.enable", i1 true}
+!21 = !{!"llvm.loop.distribute.enable"}
!22 = !{!"function_entry_count", i64 3}
!23 = !{!"branch_weights", i32 99, i32 1}
!24 = !{!"branch_weights", i32 1, i32 99}
diff --git a/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll b/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll
index eb72907730c6d..3a360814e361e 100644
--- a/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll
+++ b/llvm/test/Transforms/IRCE/add-metadata-pre-post-loops.ll
@@ -76,7 +76,7 @@ attributes #0 = { alwaysinline }
!3 = !{!"llvm.loop.unroll.disable"}
!4 = !{!"llvm.loop.vectorize.enable", i1 false}
!5 = !{!"llvm.loop.licm_versioning.disable"}
-!6 = !{!"llvm.loop.distribute.enable", i1 false}
+!6 = !{!"llvm.loop.distribute.disable"}
!7 = !{}
!8 = distinct !{!8, !3, !4, !5}
!9 = distinct !{!9, !3, !4, !5}
diff --git a/llvm/test/Transforms/IRCE/correct-loop-info.ll b/llvm/test/Transforms/IRCE/correct-loop-info.ll
index c75de167681ad..b1ce5383b24b8 100644
--- a/llvm/test/Transforms/IRCE/correct-loop-info.ll
+++ b/llvm/test/Transforms/IRCE/correct-loop-info.ll
@@ -181,6 +181,6 @@ declare void @pluto()
!1 = !{!"llvm.loop.unroll.disable"}
!2 = !{!"llvm.loop.vectorize.enable", i1 false}
!3 = !{!"llvm.loop.licm_versioning.disable"}
-!4 = !{!"llvm.loop.distribute.enable", i1 false}
+!4 = !{!"llvm.loop.distribute.disable"}
!5 = !{}
!6 = distinct !{!6, !1, !2, !3, !4}
diff --git a/llvm/test/Transforms/IRCE/loop-guarded-bounds.ll b/llvm/test/Transforms/IRCE/loop-guarded-bounds.ll
index ea169987cf2fc..61cfef6f1492a 100644
--- a/llvm/test/Transforms/IRCE/loop-guarded-bounds.ll
+++ b/llvm/test/Transforms/IRCE/loop-guarded-bounds.ll
@@ -130,7 +130,7 @@ exit: ; preds = %guarded, %loop_, %prehead
; CHECK: [[META1]] = !{!"llvm.loop.unroll.disable"}
; CHECK: [[META2]] = !{!"llvm.loop.vectorize.enable", i1 false}
; CHECK: [[META3]] = !{!"llvm.loop.licm_versioning.disable"}
-; CHECK: [[META4]] = !{!"llvm.loop.distribute.enable", i1 false}
+; CHECK: [[META4]] = !{!"llvm.loop.distribute.disable"}
; CHECK: [[META5]] = !{}
; CHECK: [[LOOP6]] = distinct !{[[LOOP6]], [[META1]], [[META2]], [[META3]], [[META4]]}
;.
diff --git a/llvm/test/Transforms/IRCE/pre_post_loops.ll b/llvm/test/Transforms/IRCE/pre_post_loops.ll
index da2faa34719af..2807adba35940 100644
--- a/llvm/test/Transforms/IRCE/pre_post_loops.ll
+++ b/llvm/test/Transforms/IRCE/pre_post_loops.ll
@@ -163,7 +163,7 @@ exit:
; CHECK: [[META2]] = !{!"llvm.loop.unroll.disable"}
; CHECK: [[META3]] = !{!"llvm.loop.vectorize.enable", i1 false}
; CHECK: [[META4]] = !{!"llvm.loop.licm_versioning.disable"}
-; CHECK: [[META5]] = !{!"llvm.loop.distribute.enable", i1 false}
+; CHECK: [[META5]] = !{!"llvm.loop.distribute.disable"}
; CHECK: [[META6]] = !{}
; CHECK: [[LOOP7]] = distinct !{[[LOOP7]], [[META2]], [[META3]], [[META4]], [[META5]]}
;.
diff --git a/llvm/test/Transforms/IRCE/range_intersect_miscompile.ll b/llvm/test/Transforms/IRCE/range_intersect_miscompile.ll
index 68613feacba32..2e21bb5ad0bd0 100644
--- a/llvm/test/Transforms/IRCE/range_intersect_miscompile.ll
+++ b/llvm/test/Transforms/IRCE/range_intersect_miscompile.ll
@@ -490,7 +490,7 @@ deopt: ; preds = %range_check_block
; CHECK: [[META1]] = !{!"llvm.loop.unroll.disable"}
; CHECK: [[META2]] = !{!"llvm.loop.vectorize.enable", i1 false}
; CHECK: [[META3]] = !{!"llvm.loop.licm_versioning.disable"}
-; CHECK: [[META4]] = !{!"llvm.loop.distribute.enable", i1 false}
+; CHECK: [[META4]] = !{!"llvm.loop.distribute.disable"}
; CHECK: [[META5]] = !{}
; CHECK: [[LOOP6]] = distinct !{[[LOOP6]], [[META1]], [[META2]], [[META3]], [[META4]]}
; CHECK: [[RNG7]] = !{i32 0, i32 50}
diff --git a/llvm/test/Transforms/IRCE/unsigned_comparisons_ugt.ll b/llvm/test/Transforms/IRCE/unsigned_comparisons_ugt.ll
index 7236cf4817ade..cdd7235ac45b4 100644
--- a/llvm/test/Transforms/IRCE/unsigned_comparisons_ugt.ll
+++ b/llvm/test/Transforms/IRCE/unsigned_comparisons_ugt.ll
@@ -447,7 +447,7 @@ exit:
; CHECK: [[META2]] = !{!"llvm.loop.unroll.disable"}
; CHECK: [[META3]] = !{!"llvm.loop.vectorize.enable", i1 false}
; CHECK: [[META4]] = !{!"llvm.loop.licm_versioning.disable"}
-; CHECK: [[META5]] = !{!"llvm.loop.distribute.enable", i1 false}
+; CHECK: [[META5]] = !{!"llvm.loop.distribute.disable"}
; CHECK: [[META6]] = !{}
; CHECK: [[LOOP7]] = distinct !{[[LOOP7]], [[META2]], [[META3]], [[META4]], [[META5]]}
; CHECK: [[LOOP8]] = distinct !{[[LOOP8]], [[META2]], [[META3]], [[META4]], [[META5]]}
diff --git a/llvm/test/Transforms/IRCE/unsigned_comparisons_ult.ll b/llvm/test/Transforms/IRCE/unsigned_comparisons_ult.ll
index 546e1b0faa1c3..107a3554282ad 100644
--- a/llvm/test/Transforms/IRCE/unsigned_comparisons_ult.ll
+++ b/llvm/test/Transforms/IRCE/unsigned_comparisons_ult.ll
@@ -654,7 +654,7 @@ exit:
; CHECK: [[META2]] = !{!"llvm.loop.unroll.disable"}
; CHECK: [[META3]] = !{!"llvm.loop.vectorize.enable", i1 false}
; CHECK: [[META4]] = !{!"llvm.loop.licm_versioning.disable"}
-; CHECK: [[META5]] = !{!"llvm.loop.distribute.enable", i1 false}
+; CHECK: [[META5]] = !{!"llvm.loop.distribute.disable"}
; CHECK: [[META6]] = !{}
; CHECK: [[LOOP7]] = distinct !{[[LOOP7]], [[META2]], [[META3]], [[META4]], [[META5]]}
; CHECK: [[LOOP8]] = distinct !{[[LOOP8]], [[META2]], [[META3]], [[META4]], [[META5]]}
diff --git a/llvm/test/Transforms/Inline/dilocation-loop-metadata-update.ll b/llvm/test/Transforms/Inline/dilocation-loop-metadata-update.ll
index 1bc132663331b..0d8dcfbcf2a8b 100644
--- a/llvm/test/Transforms/Inline/dilocation-loop-metadata-update.ll
+++ b/llvm/test/Transforms/Inline/dilocation-loop-metadata-update.ll
@@ -47,7 +47,7 @@ entry:
!7 = !DILocation(line: 6, column: 3, scope: !3)
!8 = !DILocation(line: 7, column: 22, scope: !3)
!9 = !{!"llvm.loop.mustprogress"}
-!10 = !{!"llvm.loop.distribute.enable", i1 true}
+!10 = !{!"llvm.loop.distribute.enable"}
!11 = !{!"llvm.loop.distribute.followup_all", !7, !8, !9, !12, !13, !14}
!12 = !{!"llvm.loop.vectorize.width", i32 8}
!13 = !{!"llvm.loop.vectorize.enable", i1 true}
@@ -66,7 +66,7 @@ entry:
; CHECK: [[META7]] = !DILocation(line: 6, column: 3, scope: [[DBG3]])
; CHECK: [[META8]] = !DILocation(line: 7, column: 22, scope: [[DBG3]])
; CHECK: [[META9]] = !{!"llvm.loop.mustprogress"}
-; CHECK: [[META10]] = !{!"llvm.loop.distribute.enable", i1 true}
+; CHECK: [[META10]] = !{!"llvm.loop.distribute.enable"}
; CHECK: [[META11]] = !{!"llvm.loop.distribute.followup_all", [[META7]], [[META8]], [[META9]], [[META12:![0-9]+]], [[META13:![0-9]+]], [[META14:![0-9]+]]}
; CHECK: [[META12]] = !{!"llvm.loop.vectorize.width", i32 8}
; CHECK: [[META13]] = !{!"llvm.loop.vectorize.enable", i1 true}
diff --git a/llvm/test/Transforms/LoopDistribute/basic-with-memchecks.ll b/llvm/test/Transforms/LoopDistribute/basic-with-memchecks.ll
index 2828882afe779..dcd231a900ee2 100644
--- a/llvm/test/Transforms/LoopDistribute/basic-with-memchecks.ll
+++ b/llvm/test/Transforms/LoopDistribute/basic-with-memchecks.ll
@@ -288,5 +288,5 @@ attributes #0 = { nounwind readnone convergent }
attributes #1 = { nounwind convergent }
!0 = distinct !{!0, !1}
-!1 = !{!"llvm.loop.distribute.enable", i1 true}
+!1 = !{!"llvm.loop.distribute.enable"}
; CHECK: ![[PROF1]] = !{!"unknown", !"loop-versioning"}
diff --git a/llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll b/llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll
index b5ef3578eadd9..4f2f76191e615 100644
--- a/llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll
+++ b/llvm/test/Transforms/LoopDistribute/diagnostics-with-hotness.ll
@@ -74,7 +74,7 @@ for.cond.cleanup:
!18 = !DILocation(line: 4, column: 5, scope: !7)
!19 = !DILocation(line: 4, column: 10, scope: !7)
!20 = distinct !{!20, !21}
-!21 = !{!"llvm.loop.distribute.enable", i1 true}
+!21 = !{!"llvm.loop.distribute.enable"}
!22 = !{!"function_entry_count", i64 3}
!23 = !{!"branch_weights", i32 2000, i32 1}
!24 = !{!"branch_weights", i32 1, i32 99}
diff --git a/llvm/test/Transforms/LoopDistribute/diagnostics.ll b/llvm/test/Transforms/LoopDistribute/diagnostics.ll
index e6a0d83bd63d2..80b217d0abb2b 100644
--- a/llvm/test/Transforms/LoopDistribute/diagnostics.ll
+++ b/llvm/test/Transforms/LoopDistribute/diagnostics.ll
@@ -194,7 +194,7 @@ attributes #1 = { nounwind convergent }
!18 = !DILocation(line: 4, column: 5, scope: !7)
!19 = !DILocation(line: 4, column: 10, scope: !7)
!20 = distinct !{!20, !21}
-!21 = !{!"llvm.loop.distribute.enable", i1 true}
+!21 = !{!"llvm.loop.distribute.enable"}
!22 = distinct !DISubprogram(name: "not_forced", scope: !1, file: !1, line: 8, type: !8, isLocal: false, isDefinition: true, scopeLine: 8, flags: DIFlagPrototyped, isOptimized: true, unit: !0, retainedNodes: !2)
!23 = !DILocation(line: 9, column: 20, scope: !22)
!24 = !DILocation(line: 9, column: 3, scope: !22)
diff --git a/llvm/test/Transforms/LoopDistribute/disable_nonforced_enable.ll b/llvm/test/Transforms/LoopDistribute/disable_nonforced_enable.ll
index 45a2d31256a27..eff1621cd7ada 100644
--- a/llvm/test/Transforms/LoopDistribute/disable_nonforced_enable.ll
+++ b/llvm/test/Transforms/LoopDistribute/disable_nonforced_enable.ll
@@ -43,4 +43,4 @@ for.end:
ret void
}
-!0 = distinct !{!0, !{!"llvm.loop.disable_nonforced"}, !{!"llvm.loop.distribute.enable", i32 1}}
+!0 = distinct !{!0, !{!"llvm.loop.disable_nonforced"}, !{!"llvm.loop.distr...
[truncated]
``````````
</details>
https://github.com/llvm/llvm-project/pull/192456
More information about the Mlir-commits
mailing list