[Bug target/82463] New: vec_madd does not map to __builtin_s390_vfmasb for z14

markos at freevec dot org gcc-bugzilla@gcc.gnu.org
Sat Oct 7 08:25:00 GMT 2017


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

            Bug ID: 82463
           Summary: vec_madd does not map to __builtin_s390_vfmasb for z14
           Product: gcc
           Version: 8.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
          Assignee: unassigned at gcc dot gnu.org
          Reporter: markos at freevec dot org
  Target Milestone: ---
              Host: s390x-ibm-linux-gnu
            Target: s390x-ibm-linux-gnu
             Build: s390x-ibm-linux-gnu

Trying to compile the simple test case breaks:

#include <vecintrin.h>

typedef __vector float Packet4f;

int main() {
        Packet4f v1 = { 1.0, -1.0, -2.0, 2.0 };
        Packet4f v2 = { 2.0,  0.5,  0.1, 0.2 };
        Packet4f v0 = { 0.0,  0.0,  0.0, 0.0 };

        Packet4f prod = vec_madd(v1, v2, v0);
}

g++ -march=z14 -mzvector zvectortest2.cpp -o zvectortest2
zvectortest2.cpp: In function 'int main()':
zvectortest2.cpp:10:37: error: cannot convert 'Packet4f {aka __vector(4)
float}' to '__vector(2) double' for argument '1' to '__vector(2) double
__builtin_s390_vfmadb(__vector(2) double, __vector(2) double, __vector(2)
double)'
  Packet4f prod = vec_madd(v1, v2, v0);

Changing to __builtin_s390_vfmasb explicitly seems to work.


More information about the Gcc-bugs mailing list