topperc wrote: @nikic is something like this the right fix
``` diff --git a/llvm/lib/Analysis/ValueTracking.cpp b/llvm/lib/Analysis/ValueTracking.cpp index 8c29c242215d..b03a56c922de 100644 --- a/llvm/lib/Analysis/ValueTracking.cpp +++ b/llvm/lib/Analysis/ValueTracking.cpp @@ -235,8 +235,11 @@ bool llvm::haveNoCommonBitsSet(const WithCache<const Value *> &LHSCache, "LHS and RHS should be integers"); if (haveNoCommonBitsSetSpecialCases(LHS, RHS) || - haveNoCommonBitsSetSpecialCases(RHS, LHS)) - return true; + haveNoCommonBitsSetSpecialCases(RHS, LHS)) { + if (isGuaranteedNotToBeUndefOrPoison(LHS, SQ.AC, SQ.CxtI, SQ.DT) && + isGuaranteedNotToBeUndefOrPoison(RHS, SQ.AC, SQ.CxtI, SQ.DT)) + return true; + } return KnownBits::haveNoCommonBitsSet(LHSCache.getKnownBits(SQ), RHSCache.getKnownBits(SQ)); ``` https://github.com/llvm/llvm-project/pull/72912 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits