[PATCH] D88785: Support {S,U}REMEqFold before legalization
Simonas Kazlauskas via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Mar 9 11:30:12 PST 2021
nagisa added a comment.
In cases where we do end up with a instruction count regression, the reason appears to be because lowering would fall back to `BuildUDIV` (and the `MULHU/SHIFT` strength reduction it implements). The `BuildUDIV` reduction is slightly shorter in instruction count, but it also depends on the target's ability to cheaply compute the higher half of the multiplication result.
I think the regressions here can be mitigated by checking if we have a cheap `MULHU` for the type and letting the codegen to fall-through to lowering via `BuildUDIV`. I will try to fiddling with ideas here, if the regression turns out to be blocking this change, but ideally, if possible, I'd like the experiments in that direction be independent of this diff.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D88785/new/
https://reviews.llvm.org/D88785
More information about the llvm-commits
mailing list