[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-17 Thread Sven van Haastregt via Phabricator via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rGdf5a905aa8a8: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387) (authored by svenvh). Herald added a project: clang. Repository: rG LLVM Github Monorepo CHANGES SINCE LAST ACTION https:

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-12 Thread Anastasia Stulova via Phabricator via cfe-commits
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 Indices; svenvh wrote: > Anastasia wrote:

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-11 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh marked an inline comment as done. svenvh added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7057 + +if (Val.isVector()) { + SmallVector Indices; Anastasia wrote: > can Val not be vector at this point? Yes, for example when evaluatin

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-10 Thread Anastasia Stulova via Phabricator via cfe-commits
Anastasia added inline comments. Comment at: clang/lib/AST/ExprConstant.cpp:7057 + +if (Val.isVector()) { + SmallVector Indices; can Val not be vector at this point? CHANGES SINCE LAST ACTION https://reviews.llvm.org/D71133/new/ https://reviews.llvm

[PATCH] D71133: [OpenCL] Add ExtVectorElementExpr constant evaluation (PR42387)

2019-12-06 Thread Sven van Haastregt via Phabricator via cfe-commits
svenvh created this revision. svenvh added a reviewer: Anastasia. Herald added a subscriber: yaxunl. Add constexpr evaluation for ExtVectorElementExpr nodes by evaluating the underlying vector expression. Add basic folding too, for the case that Evaluate does not return an LValue. https://revie