[llvm] [PredicateInfo] Extract information from assume operand bundles (PR #177349)

via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 22 06:30:31 PST 2026


github-actions[bot] wrote:

<!--LLVM CODE FORMAT COMMENT: {clang-format}-->


:warning: C/C++ code formatter, clang-format found issues in your code. :warning:

<details>
<summary>
You can test this locally with the following command:
</summary>

``````````bash
git-clang-format --diff origin/main HEAD --extensions cpp,h -- llvm/include/llvm/Transforms/Utils/PredicateInfo.h llvm/lib/Transforms/Scalar/NewGVN.cpp llvm/lib/Transforms/Utils/PredicateInfo.cpp --diff_from_common_commit
``````````

:warning:
The reproduction instructions above might return results for more than one PR
in a stack if you are using a stacked PR workflow. You can limit the results by
changing `origin/main` to the base branch/commit you want to compare against.
:warning:

</details>

<details>
<summary>
View the diff from clang-format here.
</summary>

``````````diff
diff --git a/llvm/include/llvm/Transforms/Utils/PredicateInfo.h b/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
index 306f512cd..986a64e91 100644
--- a/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
+++ b/llvm/include/llvm/Transforms/Utils/PredicateInfo.h
@@ -67,7 +67,12 @@ class Value;
 class IntrinsicInst;
 class raw_ostream;
 
-enum PredicateType { PT_Branch, PT_ConditionAssume, PT_BundleAssume, PT_Switch };
+enum PredicateType {
+  PT_Branch,
+  PT_ConditionAssume,
+  PT_BundleAssume,
+  PT_Switch
+};
 
 /// Constraint for a predicate of the form "cmp Pred Op, OtherOp", where Op
 /// is the value the constraint applies to (the bitcast result).
diff --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
index d500708d1..df32482f9 100644
--- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp
+++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
@@ -846,7 +846,7 @@ public:
         OS << "]";
       } else if (const auto *PA = dyn_cast<PredicateAssume>(PI)) {
         OS << "; assume predicate info {";
-        if (auto * PBA = dyn_cast<PredicateBundleAssume>(PA)) {
+        if (auto *PBA = dyn_cast<PredicateBundleAssume>(PA)) {
           OS << " Attribute: " << Attribute::getNameFromAttrKind(PBA->AttrKind);
         } else {
           assert(isa<PredicateConditionAssume>(PA));

``````````

</details>


https://github.com/llvm/llvm-project/pull/177349


More information about the llvm-commits mailing list