[all-commits] [llvm/llvm-project] a5c1ec: [RISCV] Disable performCombineVMergeAndVOps for Ps...
Yeting Kuo via All-commits
all-commits at lists.llvm.org
Tue Nov 7 00:21:49 PST 2023
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a5c1ecada27a84161e8d947b4f4564c785aa3807
https://github.com/llvm/llvm-project/commit/a5c1ecada27a84161e8d947b4f4564c785aa3807
Author: Yeting Kuo <46629943+yetingk at users.noreply.github.com>
Date: 2023-11-07 (Tue, 07 Nov 2023)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.h
M llvm/lib/Target/RISCV/RISCVInstrInfoVPseudos.td
M llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-masked-vops.ll
M llvm/test/CodeGen/RISCV/rvv/rvv-peephole-vmerge-vops.ll
Log Message:
-----------
[RISCV] Disable performCombineVMergeAndVOps for PseduoVIOTA_M. (#71483)
This transformation might be illegal for `PseduoVIOTA_M`. The value of
`viota.m vd, vs2` is the prefix sum of vd2 and adding mask for it may
cause wrong prefix sum.
Take an example, the result of following expression is `{5, 5, 5, 3}`,
```
; v4 = {1, 1, 1, 1}
viota.m v1, v4
; v0 = {0, 0, 0, 1}, v1 = {0, 1, 2, 3}, v8 = {5, 5, 5, 5}
vmerge.vvm v8, v8, v1, v0.t
; v8 = {5, 5, 5, 3}
```
but if we merge them to `viota.m v8, v4, v0.t`, then the result of is
`{5, 5, 5, 0}`.
Also, we still does `performCombineVMergeAndVOps` for `voita.m` when
mask of `vmerge.vvm` is a true mask.
More information about the All-commits
mailing list