-
Notifications
You must be signed in to change notification settings - Fork 13.4k
Clang ICEs compiling project pveclib __float128 implementation #127344
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
@llvm/issue-subscribers-backend-powerpc Author: Steven Munroe (munroesj52)
For the project: https://github.com/open-power-sdk/pveclib
Clang 16/17/18 ICEs when compiling PVECLIB implementation for __Float128/__int128 types. In powerpc64le these types are implemented in the PowerISA in 128-bit vector (VMX) registers. So are __Float128/__int128 types scalars OR vectors, Yes for PowerISA. While POWER9 implements _Float128 in hardware but PVECLIB it trying to implement _Float128 operations for POWER8 and earlier using the wider (__int128) registers of the vector unit. This is working in GCC. But clang is pita as it is ICEing without useful diagnostics. Clang does generate preprocessed source and run scripts on these occasions but not sure how to attach those in this tool. |
Hi Steve, clang should produce a preprocessed file and invocation script when it crashes. Can you attach those to this PR? |
It says file type .c and .sh are not allowed!? Is this a size problem? Fedora problem? Any suggestions? |
Tried: tar -zcf clang18-ppc64le-f128.tgz ./clang-ice/vec_f128_dummy-203ba0.* and uploading clang18-ppc64le-f128.tgz still no joy... |
I seems that clang does no like it when I mess the clang defined types. But I must! Because GCC/clang have been and continues to be inconsistent. So does clang (and which version) actually support IEEE _Float128 for PPC64LE? There is no clean documentation that I can find for this! Can I typedef the supported _Float128 (__binary128, __float128, __ieee128) to something I can use in code common to GCC/Clang? |
There appear to be two distinct issues here:
The float128 feature is currently disabled by default for PowerPC targets (POWER7 and newer). This stems from compilation failures involving glibc - when float128 is enabled, certain standard library headers cause type mismatch errors. This has since been fixed in upstream glibc by @tuliom as I recall.
The second issue concerns missing _Float128 support in powerpc64le Clang, related to #97335. A proposed fix exists in the LLVM patch D111382 (cc @hubert-reinterpretcast @MaskRay for context). |
I am not concerned about powerpc targets and PWR7. Primary focus work on PowerPC64LE targets PWR8/9/10. But I keep finding differences in behavior between clang and GCC especially as it relates -mfloat128 and _Float128 types. |
Ok why are you wasting my time. I have the files generated by clang ice. But this tool keeps telling me that those file types are not allowed. So do you want this information or not. |
No description provided. |
WTF: clang -m64 -O3 -mcpu=power8 -mvsx -mfloat128 -c clang_ice.c -o clang_ice.o generates: clang_ice.c:149:25: error: use of '__int128' with '__vector bool' requires VSX support enabled (on POWER10 or later) When I compile with -mcpu=power10, I get the ICE which produced the files clang_ice-c97d52.c and clang_ice-c97d52.sh that github will not allow me to attach. This is clang-18 PVECLIB supports all quadword integer operations (including) for P7/8/9/10 and GCC compiles this code for all -mvsx platforms. |
GitHub is annoying about attachment support, yes. Can you try renaming them to use the |
For the project: https://github.com/open-power-sdk/pveclib
Clang 16/17/18 ICEs when compiling PVECLIB implementation for __Float128/__int128 types.
In powerpc64le these types are implemented in the PowerISA in 128-bit vector (VMX) registers.
So are __Float128/__int128 types scalars OR vectors, Yes for PowerISA.
While POWER9 implements _Float128 in hardware but PVECLIB it trying to implement _Float128 operations for POWER8 and earlier using the wider (__int128) registers of the vector unit.
This is working in GCC.
But clang is pita as it is ICEing without useful diagnostics.
Clang does generate preprocessed source and run scripts on these occasions but not sure how to attach those in this tool.
The text was updated successfully, but these errors were encountered: