On Tue, Jan 3, 2012 at 11:50 AM, Uros Bizjak <ubiz...@gmail.com> wrote: > On Mon, Jan 2, 2012 at 9:31 PM, Richard Henderson <r...@redhat.com> wrote: >> On 01/03/2012 06:47 AM, Uros Bizjak wrote: >>> if (d->testing_p) >>> return true; >>> >>> + hi = shift < nelt ? d->op1 : d->op0; >>> + lo = shift < nelt ? d->op0 : d->op1; >>> + >>> + shift %= nelt; >> >> This bit only works for little-endian. It's why I had that assert >> for shift range 1-63, for one thing. >> >> I guess an extra check for big-endian before the loop could fix that. >> I.e. >> >> shift = d->perm[0]; >> + if (BYTES_BIG_ENDIAN && shift > nelt) >> + return false; > > I tried to investigate -mbig-endian a bit, but unfortunately almost > all gcc.dg/torture/vshuf-*.c tests FAIL with -O2 on unpatched gcc. > Tests pass with -O0, though.
ATM, we have gcc.dg/torture/vshuf*.c: Native configuration is ia64-unknown-linux-gnu === gcc tests === Running target unix FAIL: gcc.dg/torture/vshuf-v2si.c -O2 (internal compiler error) FAIL: gcc.dg/torture/vshuf-v2si.c -O2 (test for excess errors) UNRESOLVED: gcc.dg/torture/vshuf-v2si.c -O2 compilation failed to produce executable === gcc Summary for unix === # of expected passes 30 # of unexpected failures 2 # of unresolved testcases 1 # of unsupported tests 112 Running target unix/-mbig-endian FAIL: gcc.dg/torture/vshuf-v16hi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v16qi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v2sf.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v2si.c -O2 (internal compiler error) FAIL: gcc.dg/torture/vshuf-v2si.c -O2 (test for excess errors) UNRESOLVED: gcc.dg/torture/vshuf-v2si.c -O2 compilation failed to produce executable FAIL: gcc.dg/torture/vshuf-v32qi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v4hi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v4sf.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v4si.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v8hi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v8qi.c -O2 execution test FAIL: gcc.dg/torture/vshuf-v8si.c -O2 execution test === gcc Summary for unix/-mbig-endian === # of expected passes 20 # of unexpected failures 12 # of unresolved testcases 1 # of unsupported tests 112 === gcc Summary === # of expected passes 50 # of unexpected failures 14 # of unresolved testcases 2 # of unsupported tests 224 /home/uros/gcc-build/gcc/xgcc version 4.7.0 20120103 (experimental) [trunk revision 182829] (GCC) Uros.