[all-commits] [llvm/llvm-project] 3b0b84: [RISCV] Fix illegal build_vector when lowering dou...

Luke Lau via All-commits all-commits at lists.llvm.org
Wed Oct 4 13:28:59 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3b0b84fd008040a89596caef7dd0a120a88730fb
      https://github.com/llvm/llvm-project/commit/3b0b84fd008040a89596caef7dd0a120a88730fb
  Author: Luke Lau <luke at igalia.com>
  Date:   2023-10-04 (Wed, 04 Oct 2023)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-buildvec.ll
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-int-buildvec.ll

  Log Message:
  -----------
  [RISCV] Fix illegal build_vector when lowering double id buildvec on RV32 (#67017)

When lowering a constant build_vector sequence of doubles on RV32, if
the
addend wasn't zero, or the step/denominator wasn't one, it would crash
trying
to emit an illegal build_vector of <n x i64> with i32 operands, e.g:

t15: v2i64 = BUILD_VECTOR Constant:i32<1>, Constant:i32<1>

This patch fixes this by lowering the splats with
SelectionDAG::getConstant
with the vector type, which handles making it legal via
splat_vector_parts.




More information about the All-commits mailing list