[PATCH] D153560: [Clang] Allow C++11 style initialisation of SVE types.
Paul Walker via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 26 09:35:32 PDT 2023
paulwalker-arm added inline comments.
================
Comment at: clang/lib/CodeGen/CGExprScalar.cpp:1878
+
+ llvm_unreachable("Unexpected initialization of a scalable vector!");
+ }
----------------
efriedma wrote:
> paulwalker-arm wrote:
> > efriedma wrote:
> > > I can see why you can't have more than one element... but both zero and one seem feasible. (For example, `__SVInt8_t s8{__SVInt8_t{}};`.)
> > I thought the same but anything more that zero triggers a `cannot initialize a value of type '__SVFloat32_t' with an rvalue of type...` compilation error message. Since I got the same error with gcc I didn't dig any deeper.
> Let me put it this way: the following crashes on main, and this patch doesn't address it.
>
> ```
> void test_locals(__SVInt8_t x) {
> __SVInt8_t s8{x};
> }
> ```
Oh, sorry, I misread the previous example.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D153560/new/
https://reviews.llvm.org/D153560
More information about the cfe-commits
mailing list