[PATCH] D14877: Fix ICE on lowering of constexpr vector splats

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Wed Jan 6 17:58:28 PST 2016


rsmith added a comment.

Maybe we could remove `CK_BooleanToSignedFloating` and model that conversion as a sequence of `CK_BooleanToSignedIntegral` followed by `CK_IntegralToFloating`? I don't imagine it's a common operation, so the simpler AST representation is probably worth more than the minor memory savings.


================
Comment at: lib/AST/ExprConstant.cpp:7794
@@ -7790,1 +7793,3 @@
+      IntResult = (uint64_t)-1;
+    return Success(IntResult, E);
   }
----------------
I think this will produce the wrong value when the destination type of the cast is `__int128`. We should probably fix this by making `ASTContext::MakeIntValue` sign-extend if necessary when the target type is signed.


http://reviews.llvm.org/D14877





More information about the cfe-commits mailing list