[all-commits] [llvm/llvm-project] 33af2f: [RISCV] Check type size for lax conversions betwee...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Aug 21 14:29:18 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 33af2f131db71a18aefc5469129540e2097a537f
      https://github.com/llvm/llvm-project/commit/33af2f131db71a18aefc5469129540e2097a537f
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2023-08-21 (Mon, 21 Aug 2023)

  Changed paths:
    M clang/lib/AST/ASTContext.cpp
    M clang/test/Sema/riscv-rvv-lax-vector-conversions.c

  Log Message:
  -----------
  [RISCV] Check type size for lax conversions between RVV builtin types and VectorType::RVVFixedLengthDataVector.

This code was copied from SVE and modified for RVV. For SVE, there
is only one size for builtin types so they didn't need to check
the size. For RVV, due to LMUL there are 7 different sizes of builtin
types so we do need to check the size.

I'm not sure we should have lax vector conversions at all for RVV.
That appears to be contributing to https://github.com/llvm/llvm-project/issues/64404

This patch at least fixes the obvious correctness issue.
This should be backported to LLVM 17.

Reviewed By: jacquesguan

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




More information about the All-commits mailing list