[all-commits] [llvm/llvm-project] dc72ec: [RISCV] Custom legalize vp.merge for mask vectors....
Craig Topper via All-commits
all-commits at lists.llvm.org
Wed Dec 18 19:19:35 PST 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: dc72ec808d97a83fe9d3c1889302067cbee24c91
https://github.com/llvm/llvm-project/commit/dc72ec808d97a83fe9d3c1889302067cbee24c91
Author: Craig Topper <craig.topper at sifive.com>
Date: 2024-12-18 (Wed, 18 Dec 2024)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
M llvm/lib/Target/RISCV/RISCVISelLowering.h
M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vpmerge.ll
M llvm/test/CodeGen/RISCV/rvv/vpmerge-sdnode.ll
Log Message:
-----------
[RISCV] Custom legalize vp.merge for mask vectors. (#120479)
The default legalization uses vmslt with a vector of XLen to compute a
mask. This doesn't work if the type isn't legal. For fixed vectors it
will scalarize. For scalable vectors it crashes the compiler.
This patch uses an alternate strategy that promotes the i1 vector to an
i8 vector and does the merge. I don't claim this to be the best
lowering. I wrote it quickly almost 3 years ago when a crash was
reported in our downstream.
Fixes #120405.
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list