[PATCH] D149918: [InstCombine] Add oneuse checks to shr + cmp constant folds.
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri May 5 08:04:40 PDT 2023
goldstein.w.n added a comment.
In D149918#4321150 <https://reviews.llvm.org/D149918#4321150>, @aemerson wrote:
> In D149918#4320934 <https://reviews.llvm.org/D149918#4320934>, @goldstein.w.n wrote:
>
>> Where are the codegen improvements coming from?
>> Better `imm` values or something? Personally this feels a bit of a hack at the expense of potential ILP.
>
> I'll look into exactly what changed in the codegen tomorrow. Why does this feel like a hack as opposed to all the other hasOneUse() checks in the optimizers?
The `hasOneUse` checks are there to prevent creating more instructions. Even with multi-use on `ashr` this combine
doesn't create more instructions and does shrink the critical path so it passes muster for an InstCombine.
If it is only darwin arm64 that cares about this change, why not handle it in the backend?
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