[llvm] [InstCombine] Fix infinite loop due to incorrect `DoesConsume` (PR #82973)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Mon Mar 4 09:33:37 PST 2024
================
@@ -2341,9 +2341,12 @@ Value *InstCombiner::getFreelyInvertedImpl(Value *V, bool WillInvertAllUses,
!shouldAvoidAbsorbingNotIntoSelect(*cast<SelectInst>(V));
// Selects/min/max with invertible operands are freely invertible
if (IsSelect || match(V, m_MaxOrMin(m_Value(A), m_Value(B)))) {
+ bool SaveDoesConsume = DoesConsume;
----------------
dtcxzyw wrote:
Done.
https://github.com/llvm/llvm-project/pull/82973
More information about the llvm-commits
mailing list