[PATCH] D121085: [AArch64][GlobalISel] Implement G_SELECT translate to min/max/abs
panyuntao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Mar 9 17:53:28 PST 2022
yuntaopan added a comment.
In D121085#3366519 <https://reviews.llvm.org/D121085#3366519>, @foad wrote:
> In D121085#3365851 <https://reviews.llvm.org/D121085#3365851>, @aemerson wrote:
>
>> Thanks for the patch. Unfortunately I see the code that this was ported from in SelectionDAGBuilder does the optimization there because it relies on ValueTracking's `matchSelectPattern()` infrastructure. @arsenm @foad do you think it's worth it here to replicate that functionality for generic MIR so we can avoid adding this to the IRTranslator?
>
> Shouldn't the select -> min/max/abs be done in IR, so there would be no need for this patch? See D98152 <https://reviews.llvm.org/D98152> for example.
Our development branch does not have that patch yet, I have tried that patch and it works well. it's more appropriate to handle it at the IR and no need for this patch. But I have a question,why gisel can not rely on ValueTracking infrastructure ? Because gisel is based on mir, but ValueTracking is an IR analysis ?@aemerson
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D121085/new/
https://reviews.llvm.org/D121085
More information about the llvm-commits
mailing list