This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/82322] New: vec_ceil/vec_floor/vec_round intrincics do not work for gcc 8, need __builtin_s390_vfidb.
- From: "markos at freevec dot org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Mon, 25 Sep 2017 13:43:41 +0000
- Subject: [Bug target/82322] New: vec_ceil/vec_floor/vec_round intrincics do not work for gcc 8, need __builtin_s390_vfidb.
- Auto-submitted: auto-generated
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=82322
Bug ID: 82322
Summary: vec_ceil/vec_floor/vec_round intrincics do not work
for gcc 8, need __builtin_s390_vfidb.
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
Created attachment 42233
--> https://gcc.gnu.org/bugzilla/attachment.cgi?id=42233&action=edit
testcase demonstrating compiler error for vec_round, etc.
When trying to compile the attached source with gcc 8.0.0:
> g++ -mzvector -march=z14 /home/markos/Development/zvectortest.cpp -o /home/markos/Development/zvectortest
In file included from /home/markos/Development/zvectortest.cpp:1:0:
/home/markos/Development/zvectortest.cpp: In function 'Packet2d pround(const
Packet2d&)':
/home/markos/Development/zvectortest.cpp:6:45: error: '__builtin_s390_vfi' was
not declared in this scope
Packet2d pround(const Packet2d& a) { return vec_round(a); }
^~~~~~~~~
/home/markos/Development/zvectortest.cpp:6:45: note: suggested alternative:
'__builtin_s390_vfidb'
/home/markos/Development/zvectortest.cpp: In function 'Packet2d pceil(const
Packet2d&)':
/home/markos/Development/zvectortest.cpp:7:45: error: '__builtin_s390_vfi' was
not declared in this scope
Packet2d pceil(const Packet2d& a) { return vec_ceil(a); }
^~~~~~~~
/home/markos/Development/zvectortest.cpp:7:45: note: suggested alternative:
'__builtin_s390_vfidb'
/home/markos/Development/zvectortest.cpp: In function 'Packet2d pfloor(const
Packet2d&)':
/home/markos/Development/zvectortest.cpp:8:45: error: '__builtin_s390_vfi' was
not declared in this scope
Packet2d pfloor(const Packet2d& a) { return vec_floor(a); }
^~~~~~~~~
/home/markos/Development/zvectortest.cpp:8:45: note: suggested alternative:
'__builtin_s390_vfidb'
Same result with -march=z13. Works fine with g++-6.
However, it worked with both compilers if I add the code with #ifdef __GNUC__ <
8 and use helper defines using __builtin_s390_vfidb() intrinsic.