[PATCH] D139419: [AArch64] lower abs intrinsic to new ABS instruction in GIsel
Ties Stuij via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Jan 6 02:20:06 PST 2023
stuij marked an inline comment as done.
stuij added inline comments.
================
Comment at: llvm/lib/Target/AArch64/GISel/AArch64LegalizerInfo.cpp:757-760
+ .legalIf([=](const LegalityQuery &Query) {
+ return typeInSet(0, {s32, s64})(Query) ||
+ llvm::is_contained(LegalABSVectorTypes, Query.Types[0]);
+ })
----------------
aemerson wrote:
> Am I reading this wrong or can't this be:
> ```
> .legalFor({s32, s64})
> .legalIf(typeInSet(0, LegalABSVectorTypes)
> ```
Ah right :) Thanks! I didn't consider multiple predicates for the same purpose could work. Even though almost this exact scenario is used elsewhere in the code, I see now. I should put time into understanding the engine a bit better.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D139419/new/
https://reviews.llvm.org/D139419
More information about the llvm-commits
mailing list