[PATCH] D131058: [AArch64] Add an error if SVE scalable vector types are used in a context without sve

Sander de Smalen via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Aug 12 07:48:35 PDT 2022


sdesmalen added inline comments.


================
Comment at: clang/test/Sema/arm-sve-target.cpp:25
+__SVFloat32_t other_ret();
+__SVFloat32_t test_ret() { // expected-error {{SVE vector type '__SVFloat32_t' cannot be used in a target without sve}}
+  return other_ret();
----------------
Does this implementation still allow pointers to these types?

For example, it is possible to do:
```void foo(struct bar *&ptrA, struct bar *&ptrB) {
    std::swap(ptrA, ptrB);
}
```
without having defined bar, because it's operating purely on pointers. I would expect the same behaviour for the SVE types, because it doesn't really need SVE to do this operation.


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

https://reviews.llvm.org/D131058



More information about the llvm-commits mailing list