[PATCH] D67036: [CodeGen] Use FSHR in DAGTypeLegalizer::ExpandIntRes_MULFIX
Bjorn Pettersson via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 31 06:15:25 PDT 2019
bjope added a comment.
In D67036#1653606 <https://reviews.llvm.org/D67036#1653606>, @lebedev.ri wrote:
> This is just an NFC cleanup right?
Yes, basically (if it still can be called NFC when it could impact codegen like this).
The old SRL/SHL/OR patterns would be combined to funnel shift (when FSHR is custom/legal). Now we select FSHR directly, and instead it will be expanded to an SRL/SHL/OR pattern when FSHR isn't legal.
So the result would be the same, except that the expand of FSHR puts the operands in opposite order in the ISD::OR node.
I also assume that there could be odd cases when the old SRL/SHL/OR pattern would be combined with some other operations before matching it as an FSHR. So it might be hard to guarantee that the DAG is identical after type legalization + DAG combine.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D67036/new/
https://reviews.llvm.org/D67036
More information about the llvm-commits
mailing list