[PATCH] D148210: [InstCombine] icmp(MulC * X * Y, C) --> icmp(X * Y, C)
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Apr 13 03:43:01 PDT 2023
nikic added a comment.
As I understand it, this is a reassociation problem. Once you reassociate the multiply from `(X * C) * Y` to `(X * Y) * C` this will automatically fold via the existing logic in foldICmpMulConstant(). I don't really want this logic to be duplicated.
It looks like `reassociate` currently produces this form with the constant on the inner multiply, but I'm not sure whether that's something that can be changed or not.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D148210/new/
https://reviews.llvm.org/D148210
More information about the llvm-commits
mailing list