This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [PATCH][RFC] Fix PR39943, wrong code with vectorized conversion on x86_64
On Wed, 2009-04-29 at 19:04 +0200, Richard Guenther wrote:
> On Wed, 29 Apr 2009, Janis Johnson wrote:
>
> > On Wed, 2009-04-29 at 10:40 +0200, Richard Guenther wrote:
> > > On Tue, 28 Apr 2009, Uros Bizjak wrote:
> > >
> > > > Richard Guenther wrote:
> > > > > This fixes the ICE on 177.mesa caused by type checking which catched
> > > > > the wrong-code issue that we are happily doing vectorized
> > > > > float -> unsigned and unsigned -> float conversions with the SSE
> > > > > cvtdq2ps and cvttps2dq instructions which only work with signed
> > > > > integer value ranges. Oops.
> > > > >
> > > > > ...
> > > > >
> > > > > because they all use conversions to/from unsigned ints. Ira - do you
> > > > > prefer adding another vector capability, vect_uintfloat_cvt, here
> > > > > or placing strategic XFAILs in the tests? Are there corresponding
> > > > > tests for signed int conversions? Do ppc and ia64 really handle this
> > > > > cases correctly?
> > > > >
> > > > > I'll bootstrap / test this soon. Uros, is the backend change ok?
> > > > >
> > > >
> > > > Yes, backend change is OK for all branches.
> > >
> > > This implements the testsuite harness extensions. Janis, are the
> > > testsuite changes ok for trunk (if re-testing succeeds)?
> > >
> > > Thanks,
> > > Richard.
> > >
> > > 2009-04-28 Richard Guenther <rguenther@suse.de>
> > >
> > > PR target/39943
> > > * config/i386/i386.c (ix86_vectorize_builtin_conversion): Only
> > > allow conversion to signed integers.
> > >
> > > * lib/target-supports.exp (check_effective_target_vect_uintfloat_cvt):
> > > New.
> > > (check_effective_target_vect_floatuint_cvt): Likewise.
> > > * gcc.dg/vect/slp-10.c: Adjust.
> > > * gcc.dg/vect/slp-11.c: Adjust.
> > > * gcc.dg/vect/slp-12b.c: Adjust.
> > > * gcc.dg/vect/slp-33.c: Adjust.
> > > * gcc.c-torture/compile/pr39943.c: New testcase.
> >
> > I'm not familiar with powerpc-*-linux*paired*; is that functionality
> > ever available in a compiler with a different target triplet? If not,
> > this is OK, otherwise you'll need a check that covers the functionality
> > rather than the triplet.
>
> I have no idea. I just copied from the existing
> check_effective_target_vect_intfloat_cvt check which this patch
> splits into a signed and an unsigned variant.
Well, OK then.
Janis