[PATCH] D90382: [InstCombine] foldSelectRotate - generalize to foldSelectFunnelShift
Nuno Lopes via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Nov 5 05:32:23 PST 2020
nlopes added a comment.
In D90382#2375905 <https://reviews.llvm.org/D90382#2375905>, @nikic wrote:
> @nlopes I think we should adjust the funnel shift definition to say that it blocks poison on one operand if the shift amount is zero. Basically the poison semantics should be "as if" the funnel shift were expanded, which does include an explicit select for the zero shift amount case.
The issue with having instructions block poison is that then you can't remove those instruction. Right now only `select` and `freeze` block poison. So I would try to stay away of making funnel shift block poison.
In D90382#2375906 <https://reviews.llvm.org/D90382#2375906>, @RKSimon wrote:
> Thanks @nlopes - I assume a suitably positioned isGuaranteedNotToBeUndefOrPoison guard should be enough to help with this?
Right. Or use freeze if the transformation is quite important for your benchmarks.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D90382/new/
https://reviews.llvm.org/D90382
More information about the llvm-commits
mailing list