[llvm] 356a811 - [PredicateInfo] Drop redundant PredicateInfo annotation (#165434)

via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 29 04:39:54 PDT 2025


Author: Kunqiu Chen
Date: 2025-10-29T19:39:49+08:00
New Revision: 356a8114ca796096b9e98a35713afae48ce26337

URL: https://github.com/llvm/llvm-project/commit/356a8114ca796096b9e98a35713afae48ce26337
DIFF: https://github.com/llvm/llvm-project/commit/356a8114ca796096b9e98a35713afae48ce26337.diff

LOG: [PredicateInfo] Drop redundant PredicateInfo annotation (#165434)

See
https://github.com/llvm/llvm-project/pull/165419#discussion_r2470208670
for details.

The extra annotation `"; Has predicate info"` does not provide any extra
information and might poison the UTC-generated checks introduced by
#165419.

Added: 
    

Modified: 
    llvm/lib/Transforms/Utils/PredicateInfo.cpp
    llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Transforms/Utils/PredicateInfo.cpp b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
index a9ab3b3144829..27fed7340411b 100644
--- a/llvm/lib/Transforms/Utils/PredicateInfo.cpp
+++ b/llvm/lib/Transforms/Utils/PredicateInfo.cpp
@@ -809,7 +809,6 @@ class PredicateInfoAnnotatedWriter : public AssemblyAnnotationWriter {
   void emitInstructionAnnot(const Instruction *I,
                             formatted_raw_ostream &OS) override {
     if (const auto *PI = PredInfo->getPredicateInfoFor(I)) {
-      OS << "; Has predicate info\n";
       if (const auto *PB = dyn_cast<PredicateBranch>(PI)) {
         OS << "; branch predicate info { TrueEdge: " << PB->TrueEdge
            << " Comparison:" << *PB->Condition << " Edge: [";

diff  --git a/llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll b/llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll
index d9f6aed7d01c8..faf4bec61c935 100644
--- a/llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll
+++ b/llvm/test/Transforms/Util/PredicateInfo/unnamed-types.ll
@@ -6,13 +6,11 @@
 ; Check we can use ssa.copy with unnamed types.
 
 ; CHECK-LABEL: bb:
-; CHECK: Has predicate info
 ; CHECK: branch predicate info { TrueEdge: 1 Comparison:  %cmp1 = icmp ne ptr %arg, null Edge: [label %bb,label %bb1], RenamedOp: %arg }
 ; CHECK-NEXT:  %arg.0 = bitcast ptr %arg to ptr
 
 ; CHECK-LABEL: bb1:
-; CHECK: Has predicate info
-; CHECK-NEXT: branch predicate info { TrueEdge: 0 Comparison:  %cmp2 = icmp ne ptr null, %tmp Edge: [label %bb1,label %bb3], RenamedOp: %tmp }
+; CHECK: branch predicate info { TrueEdge: 0 Comparison:  %cmp2 = icmp ne ptr null, %tmp Edge: [label %bb1,label %bb3], RenamedOp: %tmp }
 ; CHECK-NEXT: %tmp.0 = bitcast ptr %tmp to ptr
 
 define void @f0(ptr %arg, ptr %tmp) {


        


More information about the llvm-commits mailing list