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

Michael Maitland via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 29 17:37:39 PDT 2023


michaelmaitland added inline comments.


================
Comment at: llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp:5509
+      // Skip constant.
+      if (auto Const = dyn_cast<ConstantSDNode>(Scalar))
+        break;
----------------
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))`


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