[PATCH] D119754: [InstCombine] reassociate min/max intrinsics with constant operands
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 14 13:08:28 PST 2022
lebedev.ri added a comment.
In D119754#3320662 <https://reviews.llvm.org/D119754#3320662>, @spatel wrote:
> In D119754#3320296 <https://reviews.llvm.org/D119754#3320296>, @lebedev.ri wrote:
>
>> For this to work in practice, we also need: https://alive2.llvm.org/ce/z/XC3JqP
>
> You mean to enable more general reassociation to cascade?
That was the idea, yes.
> If the reassociate pass handled intrinsics, it would go the other direction (pull the constant higher up in the instruction sequence). I suspect it wouldn't be a small patch to generalize that pass to handle intrinsics instead of just true binop instructions.
>
> I didn't think instcombine inverted that, but it does do that for 'or' instructions at least:
> https://github.com/llvm/llvm-project/blob/cccef321096c20825fe8738045c1d91d3b9fd57d/llvm/lib/Transforms/InstCombine/InstCombineAndOrXor.cpp#L2938
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D119754/new/
https://reviews.llvm.org/D119754
More information about the llvm-commits
mailing list