[all-commits] [llvm/llvm-project] 9a75a8: [RISCV] Fix a codegen crash in getSetCCResultType
Fraser Cormack via All-commits
all-commits at lists.llvm.org
Wed Jan 27 02:29:48 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 9a75a808c27f2d7a3ef4880be5f3febc97d5dcd2
https://github.com/llvm/llvm-project/commit/9a75a808c27f2d7a3ef4880be5f3febc97d5dcd2
Author: Fraser Cormack <fraser at codeplay.com>
Date: 2021-01-27 (Wed, 27 Jan 2021)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
A llvm/test/CodeGen/RISCV/vec3-setcc-crash.ll
Log Message:
-----------
[RISCV] Fix a codegen crash in getSetCCResultType
This patch fixes some crashes coming from
`RISCVISelLowering::getSetCCResultType`, which would occasionally return
an EVT constructed from an invalid MVT, which has a null Type pointer.
The attached test shows this happening currently for some fixed-length
vectors, which hit this issue when the V extension was enabled, even
though they're not legal types under the V extension. The fix was also
pre-emptively extended to scalable vectors which can't be represented as
an MVT, even though a test case couldn't be found for them.
Reviewed By: craig.topper
Differential Revision: https://reviews.llvm.org/D95434
More information about the All-commits
mailing list