[PATCH] Fix wrong code on aarch64 due to paradoxical subreg
James Greenhalgh
james.greenhalgh@arm.com
Thu Aug 4 16:51:00 GMT 2016
On Wed, Aug 03, 2016 at 04:08:30PM -0600, Jeff Law wrote:
> On 08/03/2016 11:41 AM, Bernd Edlinger wrote:
> >On 08/03/16 17:38, Jeff Law wrote:
> >>cse.c changes look good, but I'd really like to see a testcase for each
> >>issue in the dejagnu framework. Extra points if you tried to build a
> >>unit test using David M's framework, but that isn't required.
> >>
> >>The testcase from 70903 ought to be trivial to add to the dejagnu suite.
> >> 71779 might be more difficult, but if you could take a stab, it'd be
> >>appreciated.
> >>
> >
> >
> >Yes, sure. I had assumed that the pr70903 test case is using some
> >target-specific vector types, but now I see that it even works as-is in
> >the gcc.c-torture/execute directory.
> >
> >So I've added the test case to the cse patch. And quickly verified that
> >it works on x86_64-linux-gnu.
> >
> >
> >The pr71779 test case will be pretty difficult to reduce, because it
> >depends on combine to do the incorrect transformation and lra to spill
> >the subreg, and on the stack content at runtime to be non-zero.
> >
> >But technically it *is* already in the isl-test suite, so if isl is
> >in-tree, it is always executed by make check or make check-isl.
> >
> >It is just that gmp/mpfr/mpc and isl test results are not included by
> >contrib/test_summary, but that should be fixable. What do you think?
> >
> >Actually that should not be too difficult, as there are test-suite.log
> >files that we could just added to the test_summary output as-is, for
> >instance:
> >
> >cat isl/test-suite.log
> >
> >==================================
> > isl 0.16.1: ./test-suite.log
> >==================================
> >
> ># TOTAL: 5
> ># PASS: 5
> ># SKIP: 0
> ># XFAIL: 0
> ># FAIL: 0
> ># XPASS: 0
> ># ERROR: 0
> >
> >.. contents:: :depth: 2
> >
> >
> >Are the patches OK now?
> Yes. Thanks for taking care of this...
>
Hi Bernd,
Thanks for fixing this, but it looks like you accidentally double-added
the pr70903.c testcase.
Failures:
gcc.c-torture/execute/pr70903.c
Bisected to:
Author: edlinger <edlinger@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Thu Aug 4 13:20:57 2016 +0000
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR rtl-optimization/70903
* cse.c (cse_insn): If DEST is a paradoxical SUBREG, don't record DEST.
testsuite:
2016-08-04 Bernd Edlinger <bernd.edlinger@hotmail.de>
PR rtl-optimization/70903
* gcc.c-torture/execute/pr70903.c: New test.
.../gcc/testsuite/gcc.c-torture/execute/pr70903.c:25:1: error: redefinition of 'foo'
.../gcc/testsuite/gcc.c-torture/execute/pr70903.c:6:1: note: previous definition of 'foo' was here
.../gcc/testsuite/gcc.c-torture/execute/pr70903.c:31:5: error: redefinition of 'main'
.../gcc/testsuite/gcc.c-torture/execute/pr70903.c:12:5: note: previous definition of 'main' was here
I've fixed that up as so in revision 239142, I hope you agree the change
is obvious.
Thanks,
James
---
2016-08-04 James Greenhalgh <james.greenhalgh@arm.com>
* gcc.c-torture/execute/pr70903.c: Fix duplicate body.
diff --git a/gcc/testsuite/gcc.c-torture/execute/pr70903.c b/gcc/testsuite/gcc.c-torture/execute/pr70903.c
index 6ffd0aa..175ad1a 100644
--- a/gcc/testsuite/gcc.c-torture/execute/pr70903.c
+++ b/gcc/testsuite/gcc.c-torture/execute/pr70903.c
@@ -17,22 +17,4 @@ int main ()
__builtin_abort();
return 0;
}
-typedef unsigned char V8 __attribute__ ((vector_size (32)));
-typedef unsigned int V32 __attribute__ ((vector_size (32)));
-typedef unsigned long long V64 __attribute__ ((vector_size (32)));
-
-static V32 __attribute__ ((noinline, noclone))
-foo (V64 x)
-{
- V64 y = (V64)(V8){((V8)(V64){65535, x[0]})[1]};
- return (V32){y[0], 255};
-}
-int main ()
-{
- V32 x = foo ((V64){});
-// __builtin_printf ("%08x %08x %08x %08x %08x %08x %08x %08x\n", x[0], x[1], x[2], x[3], x[4], x[5], x[6], x[7]);
- if (x[1] != 255)
- __builtin_abort();
- return 0;
-}
More information about the Gcc-patches
mailing list