Re: r286815 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-11-15 Thread Stephen Canon via cfe-commits
The reason these commits bring it up is that I don’t see it clearly documented whether: float x = 340282356779733661637539395458142568447.0; is interpreted as float x = 340282356779733661637539395458142568447.0f; // x is FLT_MAX or as float x =

Re: r286815 - Improve handling of floating point literals in OpenCL to only use double precision if the target supports fp64.

2016-11-14 Thread Stephen Canon via cfe-commits
Can you add some non-trivial test cases that exercise double-rounding, especially near the overflow boundary? e.g. What is the expected value of x if the target does not support fp64?: float x = 340282356779733661637539395458142568447.0; – Steve > On Nov 14, 2016, at 6:15 AM, Neil

r247643 - Prevent implicit re-interpret casts between ExtVector and Scalar types.

2015-09-14 Thread Stephen Canon via cfe-commits
Author: scanon Date: Mon Sep 14 19:21:56 2015 New Revision: 247643 URL: http://llvm.org/viewvc/llvm-project?rev=247643=rev Log: Prevent implicit re-interpret casts between ExtVector and Scalar types. Previously, in certain cases lax vector conversions could occur between scalar floating-point