[PATCH] D91262: [AArch64][SVE] Allow C-style casts between fixed-size and scalable vectors

Francesco Petrogalli via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Nov 11 08:37:10 PST 2020


fpetrogalli added inline comments.


================
Comment at: clang/test/Sema/aarch64-sve-explicit-casts-fixed-size.cpp:1
+// RUN: %clang_cc1 -triple aarch64-none-linux-gnu -target-feature +sve -msve-vector-bits=512 -flax-vector-conversions=none -fallow-half-arguments-and-returns -ffreestanding -fsyntax-only -verify %s
+
----------------
Please add all cases supported, from 128 up to 2048 (doubling the size in each invocation).


================
Comment at: clang/test/Sema/aarch64-sve-explicit-casts-fixed-size.cpp:16
+// Fixed-size SVE types can be cast to scalable SVE types (regardless of lane size).
+// NOTE: the list below is not exhaustive for all SVE types.
+
----------------
Maybe write a CPP macro to reduce the amount of typing in this test? The functions below they all look the same... 


================
Comment at: clang/test/Sema/aarch64-sve-explicit-casts.cpp:5
+
+// SVE types cannot be C-style casted to one another.
+// "To avoid any ambiguity [between the two operations], the ACLE does not allow C-style casting from one
----------------
Maybe use the same nomenclature of the ACLE specs, use `SVE VLAT` instead of just `SVE`.


================
Comment at: clang/test/Sema/aarch64-sve-explicit-casts.cpp:7
+// "To avoid any ambiguity [between the two operations], the ACLE does not allow C-style casting from one
+// vector type to another." ~ACLE Section 3.4 (Vector Types)
+// The functions below check that C-style casting between scalable types correctly raises an error.
----------------
Maybe add a link to the specs, and the version? (like in `00bet6`)


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D91262/new/

https://reviews.llvm.org/D91262



More information about the cfe-commits mailing list