[PATCH] D144613: [RISCV] Properly diagnose mixing RVV scalable vectors with GNU vectors.

Craig Topper via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Feb 22 18:52:54 PST 2023


craig.topper created this revision.
craig.topper added reviewers: kito-cheng, reames, frasercrmck, eopXD, rogfer01, c-rhodes.
Herald added subscribers: luke, VincentWu, ctetreau, vkmr, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, edward-jones, zzheng, jrtc27, shiva0217, niosHD, sabuasal, sunfish, simoncook, johnrusso, rbar, asb, kristof.beyls, arichardson, dschuff.
Herald added a project: All.
craig.topper requested review of this revision.
Herald added subscribers: alextsao1999, pcwang-thead, aheejin.
Herald added a project: clang.

This case was being picked up by SVE code and printing an SVE
specific message.

This patch distinquishes RVV from SVE and provides a correct error
message for RVV.

The use of the generic isSizelessBuiltinType was also picking up
WebAssembly reference types which was probably an accident so I've
removed that.

I've named the test similar to SVE's test that contains this check.
Their test also tests the arm_sve_vector_bits attribute. I plan to
add something similar for RISC-V soon so I've adopted this naming.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D144613

Files:
  clang/include/clang/AST/Type.h
  clang/include/clang/Basic/DiagnosticSemaKinds.td
  clang/lib/AST/Type.cpp
  clang/lib/Sema/SemaExpr.cpp
  clang/test/Sema/attr-riscv-rvv-vector-bits.c

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D144613.499711.patch
Type: text/x-patch
Size: 7054 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20230223/cd3bfaca/attachment.bin>


More information about the cfe-commits mailing list