[llvm] [LoongArch] lower SCALAR_TO_VECTOR to INSERT_VECTOR_ELT (PR #122863)
Yingchi Long via llvm-commits
llvm-commits at lists.llvm.org
Thu Jan 16 06:08:43 PST 2025
================
@@ -255,6 +255,7 @@ LoongArchTargetLowering::LoongArchTargetLowering(const TargetMachine &TM,
setOperationAction(ISD::SETCC, VT, Legal);
setOperationAction(ISD::VSELECT, VT, Legal);
setOperationAction(ISD::VECTOR_SHUFFLE, VT, Custom);
+ setOperationAction(ISD::SCALAR_TO_VECTOR, VT, Custom);
----------------
inclyc wrote:
> Why not make it `Legal` and define patterns in .td files.
Hi @SixWeining, I thought that in `.td` files, we can only lower operations to machine instructions. However, if this is done during ISel lowering, it gets canonicalized into a different standard SDNode. Could there be potential benefits if we incorporate some DAGCombine patterns in this approach?
https://github.com/llvm/llvm-project/pull/122863
More information about the llvm-commits
mailing list