[PATCH] D121085: [AArch64][GlobalISel] Implement G_SELECT translate to min/max/abs

Jay Foad via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Mar 8 01:18:04 PST 2022


foad added a comment.

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.


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