https://gcc.gnu.org/bugzilla/show_bug.cgi?id=63335

            Bug ID: 63335
           Summary: GCC:failures for vector double on calls to bif
                    vec_[all|any]_[nge|nle]
           Product: gcc
           Version: 4.9.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
          Assignee: unassigned at gcc dot gnu.org
          Reporter: lei at ca dot ibm.com

Calls to the following vector bifs fails with gcc with type vector double. 
Passes for vector float.

The same failures are on both BE and LE machines.

vec_all_nge
vec_any_nge
vec_all_nle
vec_any_nle

---------------------------------------------------------------------

RELEASE LEVEL INFO: 

Fails on both gcc 4.8.2 and 4.9.2

$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/powerpc64le-linux-gnu/4.8/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Ubuntu 4.8.2-19ubuntu1'
--with-bugurl=file:///usr/share/doc/gcc-4.8/README.Bugs
--enable-languages=c,c++,java,go,d,fortran,objc,obj-c++ --prefix=/usr
--program-suffix=-4.8 --enable-shared --enable-linker-build-id
--libexecdir=/usr/lib --without-included-gettext --enable-threads=posix
--with-gxx-include-dir=/usr/include/c++/4.8 --libdir=/usr/lib --enable-nls
--with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug
--enable-libstdcxx-time=yes --enable-gnu-unique-object --disable-libmudflap
--disable-libsanitizer --disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-4.8-ppc64el/jre --enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-4.8-ppc64el
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-4.8-ppc64el
--with-arch-directory=ppc64el --with-ecj-jar=/usr/share/java/eclipse-ecj.jar
--enable-objc-gc --enable-secureplt --with-cpu=power7 --with-tune=power8
--disable-multilib --enable-multiarch --disable-werror --with-long-double-128
--enable-checking=release --build=powerpc64le-linux-gnu
--host=powerpc64le-linux-gnu --target=powerpc64le-linux-gnu
Thread model: posix
gcc version 4.8.2 (Ubuntu 4.8.2-19ubuntu1)

$ /opt/at8.0/bin/gcc -v
Using built-in specs.
COLLECT_GCC=/opt/at8.0/bin/gcc
COLLECT_LTO_WRAPPER=/opt/at8.0/libexec/gcc/powerpc64le-linux-gnu/4.9.2/lto-wrapper
Target: powerpc64le-linux-gnu
Configured with:
/home/tuliom/at8.0-0/at8.0-0.ubuntu-14_ppc64le_ppc64le/sources/gcc/configure
--build=powerpc64le-linux-gnu --host=powerpc64le-linux-gnu
--target=powerpc64le-linux-gnu --with-cpu=default64 --prefix=/opt/at8.0
--with-long-double-128 --enable-secureplt --disable-multilib
--enable-threads=posix --enable-languages=c,c++,fortran,go
--enable-__cxa_atexit --enable-shared --enable-checking=release --enable-lto
--enable-gnu-indirect-function --enable-initfini-array
--with-gmp-include=/opt/at8.0/include --with-gmp-lib=/opt/at8.0/lib64
--with-mpfr-include=/opt/at8.0/include --with-mpfr-lib=/opt/at8.0/lib64
--with-mpc-include=/opt/at8.0/include --with-mpc-lib=/opt/at8.0/lib64
--without-ppl --without-cloog --without-libelf
--with-host-libstdcxx='-L/opt/at8.0/lib64 -lstdc++ -lsupc++ -lgmp -lgmpxx -lm'
--with-cpu=power7 --with-tune=power8
Thread model: posix
gcc version 4.9.2 20140812 (Advance-Toolchain-at8.0) [ibm/gcc-4_9-branch,
revision: 213889 merged from gcc-4_9-branch, revision 213872] (GCC)

---------------------------------------------------------------------

STEPS TO REPRODUCE: (Reduce the code in the README.ksh file as much as
possible)

$ gcc -m64 -fabi-version=4 -mcpu=power8 a.c
$ a.out

---------------------------------------------------------------------

ACTUAL OUTPUT:

99.00 99.00
Actual: 1 Expected: 0
return code: 1

---------------------------------------------------------------------

EXPECTED OUTPUT:

return code: 0

---------------------------------------------------------------------

TESTCASE SOURCE: 

$ cat a.c
#include <stdio.h>
#include <altivec.h>

#ifdef _TEST_FLOAT
   vector float vec = (vector float ) {99.0, 99.0, 99.0, 99.0};
#else
   vector double vec = (vector double) {99.0, 99.0};
#endif

int main() {
    int actual = -1;

    actual = vec_all_nge(vec, vec);
    if ( actual != 0) {
        printf("Actual: %d Expected: 0\n", actual);
        return 1;
    }

    return 0;
}

Reply via email to