[all-commits] [llvm/llvm-project] 2a827e: [RISCV] Fix crash a vector add has a 4x sext and z...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Oct 31 15:17:53 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 2a827e4a988b614bc6f70abe00308ceeb50dcd0a
      https://github.com/llvm/llvm-project/commit/2a827e4a988b614bc6f70abe00308ceeb50dcd0a
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-10-31 (Mon, 31 Oct 2022)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/rvv/fixed-vectors-vwaddu.ll

  Log Message:
  -----------
  [RISCV] Fix crash a vector add has a 4x sext and zext operand.

We can narrow one of the extends and keep the other original by
using a vwaddu.wv or vwadd.wv.

We were previously forgetting to keep the original operand and
instead took the source of its extend. This resulted in a type
mismatch that later failed with an impossible physical register copy.

To fix this I've refactored some code to maintain information about
whether the source needs to be extended at all for longer so we could
use it in materialize.

Differential Revision: https://reviews.llvm.org/D137106




More information about the All-commits mailing list