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

2016-01-12 Thread George Burgess IV via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL257559: [Bugfix] Fix ICE on constexpr vector splat. (authored by gbiv). Changed prior to commit: http://reviews.llvm.org/D14877?vs=44187&id=44701#toc Repository: rL LLVM http://reviews.llvm.org/D148

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

2016-01-12 Thread Richard Smith via cfe-commits
rsmith accepted this revision. This revision is now accepted and ready to land. Comment at: lib/CodeGen/CGExprScalar.cpp:816-817 @@ +815,4 @@ +// the same as the vector's element type (sans qualifiers) +assert(DstType->castAs()->getElementType().getTypePtr() == +

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

2016-01-12 Thread George Burgess IV via cfe-commits
george.burgess.iv marked 2 inline comments as done. george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2016-01-06 Thread George Burgess IV via cfe-commits
george.burgess.iv 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

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

2016-01-06 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 44187. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. Addressed all feedback, and added tests for `bool` -> `[n x i128]` case. http://reviews.llvm.org/D14877 Files: include/clang/AST/ASTContext.h include

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

2016-01-06 Thread Richard Smith via cfe-commits
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 mino

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

2016-01-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-12-21 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42686. george.burgess.iv added a comment. TIL you can use OpenCL vectors in C++ files. Fixed a bug related to not knowing this + added tests for the constexpr cases. Also, is there a better way to do the `bool` -> `APFloat` conversion in ExprConst

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

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/Sema/SemaExpr.cpp:5576 @@ +5575,3 @@ +return ExprError(); + return ImpCastExprToType(CastExprRes.get(), DestElemTy, CK); +} rsmith wrote: > Looking at `ScalarExprEmitter::VisitCastExpr`, it seems like w

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

2015-12-13 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 42683. george.burgess.iv marked an inline comment as done. george.burgess.iv added a comment. > Changes to ExprConstant and CGExprConstant appear to be pure cleanups; please > check those in as a separate change r255314, thanks. > When this is do

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

2015-12-10 Thread Richard Smith via cfe-commits
rsmith added a comment. Changes to ExprConstant and CGExprConstant appear to be pure cleanups; please check those in as a separate change. When this is done, you should also be able to remove the `IgnoreImpCasts` and `EmitScalarConversion` calls in the `CK_VectorSplat` handling in `ScalarExprE

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

2015-12-04 Thread George Burgess IV via cfe-commits
george.burgess.iv added a comment. Ping :) http://reviews.llvm.org/D14877 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2015-11-22 Thread George Burgess IV via cfe-commits
george.burgess.iv updated this revision to Diff 40895. george.burgess.iv added a comment. We now add implicit casts to splatted literals, as Richard suggested, instead of trying to handle this as a special case in `ExprConstant`. http://reviews.llvm.org/D14877 Files: include/clang/Sema/Sema.

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

2015-11-22 Thread George Burgess IV via cfe-commits
george.burgess.iv added inline comments. Comment at: lib/CodeGen/CGExprConstant.cpp:1362-1363 @@ -1360,3 +1361,4 @@ +Inits[I] = llvm::ConstantFP::get(VMContext, Elt.getFloat()); else -Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat())); +

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

2015-11-21 Thread David Majnemer via cfe-commits
majnemer added a subscriber: majnemer. Comment at: lib/CodeGen/CGExprConstant.cpp:1362-1363 @@ -1360,3 +1361,4 @@ +Inits[I] = llvm::ConstantFP::get(VMContext, Elt.getFloat()); else -Inits.push_back(llvm::ConstantFP::get(VMContext, Elt.getFloat())); +

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

2015-11-21 Thread Richard Smith via cfe-commits
It would seem cleaner to build an ImplicitCastExpr node in Sema between the operand and the splat node. On Nov 20, 2015 11:04 AM, "George Burgess IV" wrote: > george.burgess.iv created this revision. > george.burgess.iv added a reviewer: rsmith. > george.burgess.iv added a subscriber: cfe-commits

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

2015-11-20 Thread George Burgess IV via cfe-commits
george.burgess.iv created this revision. george.burgess.iv added a reviewer: rsmith. george.burgess.iv added a subscriber: cfe-commits. When evaluating constexpr vector splats, we weren't doing appropriate type conversions on the literal we were splatting, causing assertion failures in cases lik