If they have other users we'll just end up increasing the instruction count.
We might be able to weaken this to only one of them having a single use if we can prove that the and will be removed.
Fixes PR41164.
Paths
| Differential D59630
[InstCombine] Don't transform ((C1 OP zext(X)) & C2) -> zext((C1 OP X) & C2) if either zext or OP has another use. ClosedPublic Authored by craig.topper on Mar 20 2019, 10:19 PM.
Details Summary If they have other users we'll just end up increasing the instruction count. We might be able to weaken this to only one of them having a single use if we can prove that the and will be removed. Fixes PR41164.
Diff Detail Event TimelineComment Actions LGTM - could you add a TODO comment here about using m_APInt() instead of m_ConstantInt()...there's no reason to limit this to scalars AFAICT. This revision is now accepted and ready to land.Mar 21 2019, 6:40 AM Closed by commit rL356690: [InstCombine] Don't transform ((C1 OP zext(X)) & C2) -> zext((C1 OP X) & C2) if… (authored by ctopper). · Explain WhyMar 21 2019, 10:50 AM This revision was automatically updated to reflect the committed changes.
Revision Contents
Diff 191632 lib/Transforms/InstCombine/InstCombineAndOrXor.cpp
test/Transforms/InstCombine/pr41164.ll
test/Transforms/LoopVectorize/X86/small-size.ll
test/Transforms/LoopVectorize/if-conversion-nest.ll
test/Transforms/LoopVectorize/runtime-check.ll
|