Revert "[RISCV] Avoid changing etype for splat of 0 or -1"
authorPhilip Reames <preames@rivosinc.com>
Wed, 29 Jun 2022 17:24:38 +0000 (10:24 -0700)
committerPhilip Reames <listmail@philipreames.com>
Wed, 29 Jun 2022 17:27:02 +0000 (10:27 -0700)
commitdd48d3ad0e5fff78e6e3a7fd8ca830624ccb8e33
tree2ab1c8d8bb50d447c47cf1de932c24bac652d5ca
parent9a35f19e3e851e5a62499416e276ff9ae13b7b07
Revert "[RISCV] Avoid changing etype for splat of 0 or -1"

This reverts commit 755c84c62cda80b0acf51ccc5653fc6d64536f7e.  A bug was reported on the original review thread (https://reviews.llvm.org/D128006), and on inspection this patch is simply wrong.  It needs to be checking for VLInBytes, not MaxVL.  These happen to be the same when using AVL=VLMAX (which is quite common), but this does not fold when AVL != VLMAX.
llvm/lib/Target/RISCV/RISCVInsertVSETVLI.cpp
llvm/test/CodeGen/RISCV/rvv/constant-folding-crash.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-calling-conv.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp-setcc.ll
llvm/test/CodeGen/RISCV/rvv/fixed-vectors-fp2i.ll