aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
diff options
context:
space:
mode:
authorHan-Kuan Chen <hankuan.chen@sifive.com>2025-01-28 12:02:37 +0800
committerGitHub <noreply@github.com>2025-01-28 12:02:37 +0800
commit08d14e10ca4bdd4626cbe1c893961416f9703d5c (patch)
tree224f6b1fcd5c1534a26fa210b12f4c16f2fad802 /llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp
parent79685b59b78804f99e46f12ac888edbc0a6d1472 (diff)
downloadllvm-08d14e10ca4bdd4626cbe1c893961416f9703d5c.zip
llvm-08d14e10ca4bdd4626cbe1c893961416f9703d5c.tar.gz
llvm-08d14e10ca4bdd4626cbe1c893961416f9703d5c.tar.bz2
[SLP] Fix CommonMask will be transformed into an incorrect mask if createShuffle is called multiple times. (#124244)
We have two types of mask in SLP: a scalar mask and a vector mask. When vectorizing four i32 additions into <4 x i32>, SLP creates a mask of length 4. When vectorizing four <2 x i32> additions into <8 x i32>, SLP also creates a mask of length 4. We refer to the first case as a scalar mask (because the mask element represents a scalar, i32), and the second case as a vector mask (because the mask element represents a vector, <4 x i32>). At some point, we must convert the scalar mask into a vector mask (otherwise, calling TTI cost functions or IRBuilderBase functions may yield incorrect results). Since both ShuffleCostEstimator and ShuffleInstructionBuilder can modify the CommonMask, we have decided to perform the mask transformation only within createShuffle. However, we do not store the transformed result, as createShuffle may be called multiple times.
Diffstat (limited to 'llvm/lib/Target/RISCV/Disassembler/RISCVDisassembler.cpp')
0 files changed, 0 insertions, 0 deletions