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 we are supposed > to do something slightly bizarre if the source type is `bool` and we're in > OpenCL mode -- in that case we're supposed to convert `true` to -1 instead of > 1. In order for ExprConstant to get that case right, we should emit the > appropriate implicit cast for that conversion here -- maybe add a > `CK_SignedBooleanToIntegral` and a `CK_SignedBooleanToFloating`; I don't see > any nice way to express this with our existing cast kinds. ...And this behavior is only present when splatting. Joy.
http://reviews.llvm.org/D14877 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits