[DAG] Introduce getSplat utility for common dispatch pattern [nfc]
authorPhilip Reames <preames@rivosinc.com>
Mon, 3 Oct 2022 19:18:21 +0000 (12:18 -0700)
committerPhilip Reames <listmail@philipreames.com>
Mon, 3 Oct 2022 19:49:39 +0000 (12:49 -0700)
commita200b0fc256a890b3f72014d20fce9e49d75763b
tree39a3626ef30f2cd76594ac680020de6c5c373191
parent939a3d22e21f80246fc6a417da7193c0b93a7a44
[DAG] Introduce getSplat utility for common dispatch pattern [nfc]

We have a very common pattern of dispatching between BUILD_VECTOR and SPLAT_VECTOR creation repeated in many cases in code.  Common the pattern into a utility function.
llvm/include/llvm/CodeGen/SelectionDAG.h
llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
llvm/lib/CodeGen/SelectionDAG/LegalizeVectorOps.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp
llvm/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.cpp