[all-commits] [llvm/llvm-project] a94f68: Implement some constexpr vector unary operators, f...
Erich Keane via All-commits
all-commits at lists.llvm.org
Fri Dec 17 06:08:49 PST 2021
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: a94f68a2bd31db9712582b973e78746cee9a4e50
https://github.com/llvm/llvm-project/commit/a94f68a2bd31db9712582b973e78746cee9a4e50
Author: Erich Keane <erich.keane at intel.com>
Date: 2021-12-17 (Fri, 17 Dec 2021)
Changed paths:
M clang/lib/AST/ExprConstant.cpp
M clang/lib/Sema/SemaExpr.cpp
M clang/test/SemaCXX/constexpr-vectors.cpp
Log Message:
-----------
Implement some constexpr vector unary operators, fix boolean-ops
As requested in the review, this implements unary +,-,~, and ! for
vector types.
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.
Differential Revision: https://reviews.llvm.org/D115670
More information about the All-commits
mailing list