[all-commits] [llvm/llvm-project] 1de188: [CodeGen] Fix a scalable-vector crash in VSELECT l...
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Thu Jun 3 02:33:12 PDT 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 1de1887f5f18cdd2cffb756afcbfb5274b4fd92f
https://github.com/llvm/llvm-project/commit/1de1887f5f18cdd2cffb756afcbfb5274b4fd92f
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2021-06-03 (Thu, 03 Jun 2021)
Changed paths:
M llvm/lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp
M llvm/test/CodeGen/RISCV/rvv/vselect-fp-rv32.ll
M llvm/test/CodeGen/RISCV/rvv/vselect-fp-rv64.ll
Log Message:
-----------
[CodeGen] Fix a scalable-vector crash in VSELECT legalization
The `DAGTypeLegalizer::WidenVSELECTMask` function is not (yet) ready for
scalable vector types, and has numerous places in which it tries to grab
either the fixed size or number of elements of its types.
I believe that it should be possible to update this method to properly
account for scalable-vector types, but we don't have test cases for
that; RISC-V bails out early on as it has legal i1 vector masks. As
such, this patch just prevents it from crashing.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D103536
More information about the All-commits
mailing list