Anastasia added inline comments. ================ Comment at: lib/Sema/SemaExpr.cpp:832 @@ -831,2 +831,3 @@ BTy->getKind() == BuiltinType::Float)) - E = ImpCastExprToType(E, Context.DoubleTy, CK_FloatingCast).get(); + { + if (getLangOpts().OpenCL && ---------------- This should go on the previous line.
================ Comment at: lib/Sema/SemaExpr.cpp:837 @@ +836,3 @@ + .getSupportedOpenCLOpts() + .cl_khr_fp64) || + getOpenCLOptions().cl_khr_fp64)) { ---------------- Could we merge this and two lines above into one? ================ Comment at: lib/Sema/SemaExpr.cpp:840 @@ +839,3 @@ + E = ImpCastExprToType(E, Context.FloatTy, CK_FloatingCast).get(); + } + else ---------------- I think the formatting is not right here. Could you change to: } else { ================ Comment at: test/CodeGenOpenCL/fpmath.cl:28 @@ +27,3 @@ +void testdbllit(long *val) { + // CHECK-DBL: float 2.000000e+01 + printf("%f", 20.0); ---------------- Could you please add a check that double is generated in either CL2.0 or fp64 mode. https://reviews.llvm.org/D24235 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits