[PATCH] D145220: [X86][InstCombine] Simplify some `pternlog` intrinsics
Noah Goldstein via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 3 15:11:20 PST 2023
goldstein.w.n marked an inline comment as not done.
goldstein.w.n added inline comments.
================
Comment at: llvm/lib/Target/X86/X86InstCombineIntrinsic.cpp:591-594
+ // Currently we only handle cases that convert directly to another instruction
+ // or cases where all the ops are constant. This is because we don't properly
+ // handle creating ternary ops in the backend, so splitting them here may
+ // cause regressions. As the backend improves, uncomment more cases.
----------------
goldstein.w.n wrote:
> pengfei wrote:
> > Maybe better to do it in FE and remove all these intrinsics finally?
> What do you mean? Like in the header for `_mm_ternarylogic_....` add a switch statement? Or something else?
>
> But would prefer to keep it somewhere we have const/non-const info on A/B/C because it will currently cause regressions to simplify many of the cases (working on a patch for backend generation, but a ways away).
> What do you mean? Like in the header for `_mm_ternarylogic_....` add a switch statement? Or something else?
>
> But would prefer to keep it somewhere we have const/non-const info on A/B/C because it will currently cause regressions to simplify many of the cases (working on a patch for backend generation, but a ways away).
We can handle the constants algorithimically if you prefer (my feeling however is 1 implementation is preferred and if we need the table would be simpler to just use that).
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D145220/new/
https://reviews.llvm.org/D145220
More information about the llvm-commits
mailing list