[llvm] [ValueTracking] Add support for non-splat vecs in cmpExcludesZero (PR #68331)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Fri Oct 6 10:02:27 PDT 2023


================
@@ -558,7 +558,7 @@ bool llvm::isValidAssumeForContext(const Instruction *Inv,
 // example Pred=EQ, RHS=isKnownNonZero. cmpExcludesZero is called in loops
 // so the extra compile time may not be worth it, but possibly a second API
 // should be created for use outside of loops.
-static bool cmpExcludesZero(CmpInst::Predicate Pred, const Value *RHS) {
+static bool cmpExcludesZero(CmpInst::Predicate Pred, Value *RHS) {
----------------
nikic wrote:

Why does this drop the `const` qualifier?

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


More information about the llvm-commits mailing list