This revision was automatically updated to reflect the committed changes.
Closed by commit rL304963: Catch invalid bitwise operation on vector of floats
(authored by sepavloff).
Changed prior to commit:
https://reviews.llvm.org/D33732?vs=101359&id=101856#toc
Repository:
rL LLVM
https://revi
bruno accepted this revision.
bruno added a comment.
This revision is now accepted and ready to land.
LGTM
Comment at: test/Sema/ext_vector_ops.c:22
+ int array2[17];
+ // FIXME: error message below needs type!
+ (void)(array2[v2ua]); // expected-error{{array subscript is no
sepavloff updated this revision to Diff 101359.
sepavloff added a comment.
Updated regression test
The new regression test was obtained from Sema/vector-ops.c, the part of
it that checks binary complement was copied.
https://reviews.llvm.org/D33732
Files:
lib/Sema/SemaExpr.cpp
test/Sema/ex
sepavloff added inline comments.
Comment at: test/Sema/types.c:92
+
+typedef float __attribute__((ext_vector_type(4))) float4;
+float4 test3(float4 x) {
bruno wrote:
> Can you also add a test for the `vector_type` variant? It might be more
> appropriate to put
bruno added a comment.
Hi,
Comment at: test/Sema/types.c:92
+
+typedef float __attribute__((ext_vector_type(4))) float4;
+float4 test3(float4 x) {
Can you also add a test for the `vector_type` variant? It might be more
appropriate to put this at test/Sema/ext
sepavloff created this revision.
Bitwise complement applied to vector of floats described with
attribute `ext_vector_type` is not diagnosed as error. Attempt to
compile such construct causes assertion violation in Instruction.cpp.
With this change the complement is treated similar to the case of
v