[PATCH] D66057: [InstCombine] Shift amount reassociation in bittest: trunc-of-shl (PR42399)
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 15 10:12:48 PDT 2019
lebedev.ri added inline comments.
================
Comment at: llvm/lib/Transforms/InstCombine/InstCombineCompares.cpp:3315-3321
+ Instruction *XShift, *MaybeTruncation, *YShift;
+ if (!match(
+ I.getOperand(0),
+ m_c_And(m_CombineAnd(m_AnyLogicalShift, m_Instruction(XShift)),
+ m_CombineAnd(m_TruncOrSelf(m_CombineAnd(
+ m_AnyLogicalShift, m_Instruction(YShift))),
+ m_Instruction(MaybeTruncation)))))
----------------
spatel wrote:
> Can we make the change to use Instruction*/m_Instruction independently (ie as a pre-commit) of this patch?
> (I'd be fine without requiring a weird ConstExpr test to prove the diff if that was a possibility.)
I actually already did that in rL368554 to fix https://bugs.llvm.org/show_bug.cgi?id=42962
I just need to rebase this, hold on..
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66057/new/
https://reviews.llvm.org/D66057
More information about the llvm-commits
mailing list