[Sema][BFloat] Forbid arithmetic on vectors of bfloat.
Vectors of bfloat are a storage format only; you're supposed to explicitly convert them to a wider type to do arithmetic on them. But currently, if you write something like bfloat16x4_t test(bfloat16x4_t a, bfloat16x4_t b) { return a + b; } then the clang frontend accepts it without error, and (ARM or AArch64) isel fails to generate code for it. Added a rule in Sema that forbids the attempt from even being made, and tests that check it. In particular, we also outlaw arithmetic between vectors of bfloat and any other vector type. Patch by Luke Cheeseman. Reviewed By: LukeGeeson Differential Revision: https://reviews.llvm.org/D85009
Loading
Please sign in to comment