[Diffusion] rG13ec913bdf50: [InstCombine] Recognize `((x * y) s/ x) !=/== y` as an signed multiplication…
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 22 09:36:40 PDT 2021
rnk added a comment.
Sorry for the delay, busy as usual. To repro, reapply the change, take the t0_basic test case, extend it from i8 to i64, confirm that it transforms into overflow checking, then run it through llc, and check if it generates a call to __mulodi4. That call is no bueno. Any solution that avoids it is fine. You could consider a TTI hook, a check on the native word size, or something like that. Instcombine probably shouldn't be transforming inline arithmetic expressions into runtime function calls if it can avoid it, although perhaps in this case avoiding the i64 div is a win.
BRANCHES
main
Users:
lebedev.ri (Author)
https://reviews.llvm.org/rG13ec913bdf50
More information about the llvm-commits
mailing list