From: "Ulrich Weigand" <uweigand@de.ibm.com>
To: aburgess@broadcom.com (Andrew Burgess)
Cc: tromey@redhat.com, gdb-patches@sourceware.org, ken@linux.vnet.ibm.com
Subject: Re: [PATCH] Vector to scalar casting and widening
Date: Thu, 29 Nov 2012 17:50:00 -0000 [thread overview]
Message-ID: <201211291749.qATHnbBM030788@d06av02.portsmouth.uk.ibm.com> (raw)
In-Reply-To: <50B68B43.8080106@broadcom.com> from "Andrew Burgess" at Nov 28, 2012 10:08:03 PM
Andrew Burgess wrote:
> On 26/11/2012 2:18 PM, Ulrich Weigand wrote:
> > Thus, I'd prefer a patch that:
> > - changes the default behaviour of value_cast etc. to the GCC behaviour, and
> > - adds handling of UNOP_CAST etc. to evaluate_subexp_opencl to implement the
> > OpenCL semantics.
>
> The latest patch below is is closer to the initial patch I posted, the
> behaviour of value_cast now follows GCC, and the UNOP_CAST case is handled
> in evaluate_subexp_opencl. I wasn't sure what the "etc" in the above point
> referred to, I believe UNOP_CAST is all I need to catch, let me know if I've
> missed anything.
Well, there's the whole "vector <binop> scalar" issue; with your patch, this
is now only supported if the scalar type is widened, and rejected if it is
truncated. This does not correspond to OpenCL semantics, where truncation
is explicitly supported.
Another problem: in several places in opencl-lang.c, the code calls
value_cast with the explicit assumption that this will splat a scalar
across all vector components. Those uses would now have to be changed
to a value_cast/value_vector_widen pair, I guess.
> > Unfortunately the only environment I know of to test the GDB OpenCL support
> > is the IBM OpenCL SDK for PowerPC. I'll be happy to run the test for you ...
>
> I've built and tested on x86-64 GNU/Linux, but I've not run any OpenCL tests. If
> you were able to give this patch a go and let me know if I've broken any of the
> OpenCL tests I'd be very grateful.
As expected, given the above, a whole bunch of tests fail ...
Bye,
Ulrich
--
Dr. Ulrich Weigand
GNU Toolchain for Linux on System z and Cell BE
Ulrich.Weigand@de.ibm.com
next prev parent reply other threads:[~2012-11-29 17:50 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-11-13 14:10 Andrew Burgess
2012-11-19 21:17 ` Tom Tromey
2012-11-23 16:26 ` Andrew Burgess
2012-11-26 14:18 ` Ulrich Weigand
2012-11-28 22:08 ` Andrew Burgess
2012-11-29 17:50 ` Ulrich Weigand [this message]
2012-11-29 18:13 ` Andrew Burgess
2013-01-04 14:45 ` Andrew Burgess
2013-01-07 16:23 ` Ulrich Weigand
2013-01-08 15:08 ` Andrew Burgess
2013-01-08 19:05 ` Ulrich Weigand
2013-01-09 19:13 ` Tom Tromey
2013-01-25 17:18 ` Andrew Burgess
2013-01-09 19:08 ` Tom Tromey
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=201211291749.qATHnbBM030788@d06av02.portsmouth.uk.ibm.com \
--to=uweigand@de.ibm.com \
--cc=aburgess@broadcom.com \
--cc=gdb-patches@sourceware.org \
--cc=ken@linux.vnet.ibm.com \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox