[PATCH] D159053: [RISCV] Support select/merge like ops for fp16 vectors when only have Zvfhmin

Jianjian Guan via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 6 02:32:38 PDT 2023


jacquesguan added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:5509
+      // Skip constant.
+      if (auto Const = dyn_cast<ConstantSDNode>(Scalar))
+        break;
----------------
michaelmaitland wrote:
> craig.topper wrote:
> > This seems like it might be a RISC-V specific issue and not something we should do in target specific code.
> > 
> > What code is reversing the promotion? That code should be checking isOperationLegal
> If you end up doing this check, either here on in RISCV specific code, you can simplify to `if (isa<ConstantSDNode>(Scalar))`
Thanks for your advice, I use implement it in RISCV target specific logic now.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D159053/new/

https://reviews.llvm.org/D159053



More information about the llvm-commits mailing list