[PATCH] D68103: [InstCombine] Simplify shift-by-sext to shift-by-zext
Sanjay Patel via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Sep 27 10:11:03 PDT 2019
spatel added a subscriber: efriedma.
spatel added a comment.
There are a handful of existing transforms in InstCombine that look at users rather than operands, so it's not unprecedented. But I'm not sure if there's another/better way.
One possibility would be to ignore the usual hasOneUse() constraint because we're ok with the trade-off (better analysis despite a potential extra instruction).
You could add the basic fold (with m_OneUse()) as a preliminary and non-controversial step? That would reduce risk and make it clear that whatever extra code that we use is specifically for the multi-use case.
cc @efriedma in case he has advice.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D68103/new/
https://reviews.llvm.org/D68103
More information about the llvm-commits
mailing list