From df1ed0099ba6cb47fc4995e0de5128e20a05f5cb Mon Sep 17 00:00:00 2001 From: George Burgess IV Date: Wed, 13 Jan 2016 01:52:39 +0000 Subject: [Bugfix] Fix ICE on constexpr vector splat. In {CG,}ExprConstant.cpp, we weren't treating vector splats properly. This patch makes us treat splats more properly. Additionally, this patch adds a new cast kind which allows a bool->int cast to result in -1 or 0, instead of 1 or 0 (for true and false, respectively), so we can sanely model OpenCL bool->int casts in the AST. Differential Revision: http://reviews.llvm.org/D14877 llvm-svn: 257559 --- clang/lib/CodeGen/CGExprConstant.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'clang/lib/CodeGen/CGExprConstant.cpp') diff --git a/clang/lib/CodeGen/CGExprConstant.cpp b/clang/lib/CodeGen/CGExprConstant.cpp index 3839ab718fa..ee049f1810a 100644 --- a/clang/lib/CodeGen/CGExprConstant.cpp +++ b/clang/lib/CodeGen/CGExprConstant.cpp @@ -735,6 +735,7 @@ public: case CK_PointerToBoolean: case CK_NullToPointer: case CK_IntegralCast: + case CK_BooleanToSignedIntegral: case CK_IntegralToPointer: case CK_IntegralToBoolean: case CK_IntegralToFloating: -- cgit v1.2.3