[PATCH] D115670: Correct behavior of Vector boolean-operations, implement vector operator-
Erich Keane via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Dec 13 13:21:43 PST 2021
erichkeane created this revision.
erichkeane added reviewers: RKSimon, aaron.ballman, void, efriedma.
erichkeane requested review of this revision.
All of our boolean operations on vector types should be using something
like vcmpeqd, which results in a mask of '-1' for the 'truth' type. We are
currently instead using '1', which results in some incorrect
calculations when used later (note that it does NOT result in a boolean
vector, as that is not really a thing).
This patch corrects that 1 to be a -1, and updates the affected tests.
Additionally, in order to simplify changing of the tests, this ALSo
implements operator-, which simply negates all values of the vector
type.
https://reviews.llvm.org/D115670
Files:
clang/lib/AST/ExprConstant.cpp
clang/test/SemaCXX/constexpr-vectors.cpp
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D115670.394030.patch
Type: text/x-patch
Size: 14461 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20211213/ae24374d/attachment-0001.bin>
More information about the cfe-commits
mailing list