[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-15 Thread Sven van Haastregt via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaChecking.cpp:3732 // If this is an implicit conversion from float -> double, remove it. if (ImplicitCastExpr *Cast = dyn_cast(OrigArg)) { The comment should mention float -> float now as well.

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-15 Thread Neil Hickey via cfe-commits
neil.hickey removed rL LLVM as the repository for this revision. neil.hickey updated this revision to Diff 77961. neil.hickey added a comment. Fixes to tests and removal of incorrect check to stop float to float casts if types match. This was still needed as it was an lvalue to rvalue cast. Added

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-14 Thread Neil Hickey via cfe-commits
This revision was automatically updated to reflect the committed changes. Closed by commit rL286815: Improve handling of floating point literals in OpenCL to only use doubleā€¦ (authored by neil.hickey). Changed prior to commit: https://reviews.llvm.org/D24235?vs=77600&id=77783#toc Repository:

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-11 Thread Sven van Haastregt via cfe-commits
svenvh accepted this revision. svenvh added a comment. LGTM! https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-11 Thread Neil Hickey via cfe-commits
neil.hickey updated this revision to Diff 77600. neil.hickey added a comment. Improving now confusing comment. https://reviews.llvm.org/D24235 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/fpmath.cl test/SemaOpenCL/extensions.cl Index: test/SemaOpenCL/extensions

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-10 Thread Sven van Haastregt via cfe-commits
svenvh added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3431 +.getSupportedOpenCLOpts() +.cl_khr_fp64) || getOpenCLOptions().cl_khr_fp64)) { yaxunl wrote: > neil.hickey wrote: > > yaxunl

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-09 Thread Neil Hickey via cfe-commits
neil.hickey updated this revision to Diff 77321. neil.hickey added a comment. Moving location of no-diagnostics statement to beginning of file https://reviews.llvm.org/D24235 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/fpmath.cl test/SemaOpenCL/extensions.cl I

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-07 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: test/SemaOpenCL/extensions.cl:28 +#ifdef FP64 +// expected-no-diagnostics +#endif expected-no-diagnostics applies to the whole file. better move to the beginning of the file. otherwise LGTM. Thanks! https://reviews.ll

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-11-01 Thread Neil Hickey via cfe-commits
neil.hickey updated this revision to Diff 76587. neil.hickey added a comment. Sorry for the delay. It looks like the code to handle extensions was changed since Neil Henning added the check against opencl 1.2. Perhaps the best approach is just to remove the check. https://reviews.llvm.org/D242

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-20 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3431 @@ -3410,1 +3430,3 @@ +.getSupportedOpenCLOpts() +.cl_khr_fp64) || getOpenCLOptions().cl_khr_fp64)) { neil.hickey wrote: > yaxu

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-20 Thread Neil Hickey via cfe-commits
neil.hickey added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3431 @@ -3410,1 +3430,3 @@ +.getSupportedOpenCLOpts() +.cl_khr_fp64) || getOpenCLOptions().cl_khr_fp64)) { yaxunl wrote: > This

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-19 Thread Yaxun Liu via cfe-commits
yaxunl added inline comments. Comment at: lib/Sema/SemaExpr.cpp:3431 @@ -3410,1 +3430,3 @@ +.getSupportedOpenCLOpts() +.cl_khr_fp64) || getOpenCLOptions().cl_khr_fp64)) { This check (getLangOpt

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-19 Thread Neil Hickey via cfe-commits
neil.hickey added a reviewer: tstellarAMD. neil.hickey updated this revision to Diff 71837. neil.hickey added a comment. Herald added subscribers: yaxunl, wdng. There was a bug whereby an implicitcast was being applied from float to float, this caused issues later on in builin processing which ca

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-16 Thread Neil Hickey via cfe-commits
neil.hickey added a comment. committed @ 281714 https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-16 Thread Neil Hickey via cfe-commits
neil.hickey closed this revision. neil.hickey added a comment. Commit merged to trunk https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-09 Thread Anastasia Stulova via cfe-commits
Anastasia accepted this revision. Anastasia added a comment. This revision is now accepted and ready to land. LGTM! Thanks! https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-09 Thread Neil Hickey via cfe-commits
neil.hickey added inline comments. Comment at: lib/Sema/SemaExpr.cpp:837 @@ +836,3 @@ + .getSupportedOpenCLOpts() + .cl_khr_fp64) || + getOpenCLOptions().cl_khr_fp64)) { Anastasia wrote: > Could we merge this and two lines abov

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-09 Thread Neil Hickey via cfe-commits
neil.hickey updated this revision to Diff 70799. neil.hickey added a comment. Modifying formating to match LLVM style. Adding new test to confirm that the vararg for printf is cast up to a double is allowable. https://reviews.llvm.org/D24235 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.c

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-07 Thread Anastasia Stulova via cfe-commits
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 shou

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-07 Thread Neil Hickey via cfe-commits
neil.hickey updated this revision to Diff 70527. neil.hickey added a comment. Added a CodeGen test as well as fixed an issue with vararg type promotion https://reviews.llvm.org/D24235 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaType.cpp test/CodeGenOpenCL/fpmath.cl test/SemaOpenCL/extensi

Re: [PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-05 Thread Anastasia Stulova via cfe-commits
Anastasia added a comment. Could we add a CodeGen test as well to check that the constants generated are in the right precision format? https://reviews.llvm.org/D24235 ___ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cg

[PATCH] D24235: [OpenCL] Improve double literal handling

2016-09-05 Thread Neil Hickey via cfe-commits
neil.hickey created this revision. neil.hickey added a reviewer: Anastasia. neil.hickey added a subscriber: cfe-commits. Improve handling of floating point literals to only use double precision if it is supported. https://reviews.llvm.org/D24235 Files: lib/Sema/SemaExpr.cpp lib/Sema/SemaTyp