[PATCH] D141188: [MergeICmps] Adapt to non-eq comparisons

Clement Courbet via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Jan 9 03:43:38 PST 2023


courbet added inline comments.


================
Comment at: llvm/lib/Transforms/Scalar/MergeICmps.cpp:843
   if (Blocks.empty()) return false;
-  BCECmpChain CmpChain(Blocks, Phi, AA);
+  ICmpInst::Predicate Predicate = CmpInst::BAD_ICMP_PREDICATE;
+  BCECmpChain CmpChain(Blocks, Phi, AA, Predicate);
----------------
`Predicate` could be a member of `BCECmpChain`. It's conceptually is a property of the chain and this would make the code simpler.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D141188/new/

https://reviews.llvm.org/D141188



More information about the llvm-commits mailing list