diff --git a/cbackend.cpp b/cbackend.cpp index 5262a2d3..be324934 100644 --- a/cbackend.cpp +++ b/cbackend.cpp @@ -4418,10 +4418,16 @@ void CWriter::visitShuffleVectorInst(llvm::ShuffleVectorInst &SVI) { } else { // Do an extractelement of this value from the appropriate input. - Out << "(("; - printType(Out, llvm::PointerType::getUnqual(EltTy)); - Out << ")(&" << GetValueName(Op) - << "))[" << SrcVal << "]"; + if (OpElts != 1) { // all __vec16_* have overloaded operator [] + Out << "(" << GetValueName(Op) + << ")[" << SrcVal << "]"; + } + else { // but __vec1_* don't have it + Out << "(("; + printType(Out, llvm::PointerType::getUnqual(EltTy)); + Out << ")(&" << GetValueName(Op) + << "))[" << SrcVal << "]"; + } } } } diff --git a/fail_db.txt b/fail_db.txt index 63c05d4d..a90772e0 100644 --- a/fail_db.txt +++ b/fail_db.txt @@ -552,11 +552,8 @@ ./tests/gather-int8-2.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * ./tests/gather-int8-4.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/gather-int8-4.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * -./tests/ptr-diff-3.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/ptr-diff-3.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * -./tests/ptr-diff-5.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/ptr-diff-5.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * -./tests/ptr-diff-6.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/ptr-diff-6.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * ./tests/aossoa-1.ispc compfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * ./tests/aossoa-2.ispc compfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * @@ -727,11 +724,8 @@ ./tests/gather-int8-2.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * ./tests/gather-int8-4.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/gather-int8-4.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * -./tests/ptr-diff-3.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/ptr-diff-3.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * -./tests/ptr-diff-5.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/ptr-diff-5.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * -./tests/ptr-diff-6.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/ptr-diff-6.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * ./tests/aossoa-1.ispc compfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * ./tests/aossoa-2.ispc compfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * @@ -896,11 +890,8 @@ ./tests/soa-19.ispc compfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O0 * ./tests/soa-22.ispc compfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O0 * ./tests/struct-nested-5.ispc compfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O0 * -./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.4 icpc15.0 -O2 * ./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.4 icpc13.1 -O2 * -./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.5 icpc13.1 -O2 * -./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.6 icpc13.1 -O2 * ./tests/pmuls_vi64.ispc runfail x86-64 knc Linux LLVM 3.4 icpc13.1 -O2 * @@ -909,11 +900,9 @@ ./tests/soa-18.ispc runfail x86-64 knc Linux LLVM 3.4 icpc15.0 -O0 * ./tests/funcptr-varying-7.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/funcptr-varying-8.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * -./tests/pmulus_vi64.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O2 * ./tests/soa-18.ispc runfail x86-64 knc Linux LLVM 3.5 icpc15.0 -O0 * ./tests/funcptr-varying-7.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/funcptr-varying-8.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * -./tests/pmulus_vi64.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O2 * ./tests/soa-18.ispc runfail x86-64 knc Linux LLVM 3.6 icpc15.0 -O0 * ./tests/exclusive-scan-add-1.ispc compfail x86-64 generic-16 Linux LLVM 3.6 clang++3.4 -O2 * ./tests/exclusive-scan-add-10.ispc compfail x86-64 generic-16 Linux LLVM 3.6 clang++3.4 -O2 * @@ -1033,11 +1022,6 @@ ./tests/funcptr-varying-8.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * ./tests/gather-int8-2.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * ./tests/gather-int8-4.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * -./tests/pmulus_vi64.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * -./tests/ptr-diff-3.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * -./tests/ptr-diff-5.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * -./tests/ptr-diff-6.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * -./tests/reduce-equal-10.ispc runfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * ./tests/atomics-6.ispc compfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * ./tests/atomics-uniform-8.ispc compfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 * ./tests/atomics-uniform-9.ispc compfail x86-64 knc Linux LLVM 3.7 icpc15.0 -O2 *