[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)
Anastasia Stulova via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Dec 12 04:15:45 PST 2019
Anastasia accepted this revision.
Anastasia added a comment.
This revision is now accepted and ready to land.
LGTM! Thanks!
================
Comment at: clang/lib/AST/ExprConstant.cpp:7057
+
+ if (Val.isVector()) {
+ SmallVector<uint32_t, 4> Indices;
----------------
svenvh wrote:
> Anastasia wrote:
> > can Val not be vector at this point?
> Yes, for example when evaluating `const int2 fromConstexprFunc = addOne(int2(2));` from the included test case we get an LValue (that won't be folded by the code below).
I see. Would it be folded elsewhere or not folded at all?
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D71133/new/
https://reviews.llvm.org/D71133
More information about the cfe-commits
mailing list