Unverified Commit 6493da73 authored by Pengcheng Wang's avatar Pengcheng Wang Committed by GitHub
Browse files

[RISCV] Use the store value's VT as the MemoryVT after combining...

[RISCV] Use the store value's VT as the MemoryVT after combining riscv.masked.strided.store (#89874)

According to `RISCVTargetLowering::getTgtMemIntrinsic`, the MemoryVT
is the scalar element VT for strided store and the MemoryVT is the
same as the store value's VT for unit-stride store.

After combining `riscv.masked.strided.store` to `masked.store`, we
just use the scalar element VT to construct `masked.store`, which is
wrong.

With wrong MemoryVT, the DAGCombiner will combine `trunc+masked.store`
to truncated `masked.store` because `TLI.canCombineTruncStore` returns
true.

So, we should use the store value's VT as the MemoryVT.

This fixes #89833.
parent b82a4bfb
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment