[PATCH] D149918: [InstCombine] Add oneuse checks to shr + cmp constant folds.
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sun May 7 17:40:44 PDT 2023
goldstein.w.n added a comment.
In D149918#4325473 <https://reviews.llvm.org/D149918#4325473>, @dmgreen wrote:
> I can verify that this fixes the issues, including the other one from https://reviews.llvm.org/D143624#4315468 that looks more difficult to reverse. It may be worth adding some tests like https://godbolt.org/z/cxKrfM4TK. But otherwise it LGTM. Getting more ILP sounds like something the backend should handle, if it is profitable given the constants.
I think the generic statement "more ILP is better than less ILP" is fair for instcombine to make. Choosing which constants are profitable (what this patch is trying to approximate), however, still doesn't make sense to me.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D149918/new/
https://reviews.llvm.org/D149918
More information about the llvm-commits
mailing list