diff options
| author | George Burgess IV <george.burgess.iv@gmail.com> | 2016-01-13 01:52:39 +0000 |
|---|---|---|
| committer | George Burgess IV <george.burgess.iv@gmail.com> | 2016-01-13 01:52:39 +0000 |
| commit | 2824a0744ca037a1b976efcc1d848aecb41dabd5 (patch) | |
| tree | 94b5b931d678a3e0c1b7b3d825f2930f48e00e4f /lib/CodeGen/CGExprComplex.cpp | |
| parent | 05d274ca67f6370f61ca426a0939e40f3489f248 (diff) | |
| download | clang-2824a0744ca037a1b976efcc1d848aecb41dabd5.tar.gz | |
[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
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@257559 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGExprComplex.cpp')
| -rw-r--r-- | lib/CodeGen/CGExprComplex.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/CodeGen/CGExprComplex.cpp b/lib/CodeGen/CGExprComplex.cpp index ccdb53287e..22910d931d 100644 --- a/lib/CodeGen/CGExprComplex.cpp +++ b/lib/CodeGen/CGExprComplex.cpp @@ -462,6 +462,7 @@ ComplexPairTy ComplexExprEmitter::EmitCast(CastKind CK, Expr *Op, case CK_ToVoid: case CK_VectorSplat: case CK_IntegralCast: + case CK_BooleanToSignedIntegral: case CK_IntegralToBoolean: case CK_IntegralToFloating: case CK_FloatingToIntegral: |
