computeKnownBits is expensive. The cases that would be detected by the computeKnownBits portion of haveNoCommonBitsSet were already handled by the earlier call to SimplifyDemandedInstructionBits.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
This is a NFC, right?
I suppose it makes sense. I kinda hoped inlining would have taken care of it.
There may be a similar case in the visitAdd().
lib/Transforms/InstCombine/InstCombineAndOrXor.cpp | ||
---|---|---|
2513 ↗ | (On Diff #160250) | s/it/is/ |
2517–2520 ↗ | (On Diff #160250) | Here this could be if (match(&I, m_c_Xor(m_c_And(m_Not(m_Value(M)), m_Value()), m_c_And(m_Deferred(M), m_Value())))) |
Comment Actions
We don't currently turn Add into Or inside SimplifyDemandedBits so visitAdd doesn't have this issue. I'm a little skeptical that we should be aggressively turning adds into ors. I plan to start an llvm-dev thread on that.
I believe this is NFC based on my understanding of SimplifyDemandedInstructionBits and haveNoCommonBitSet.