Skip to content
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

[PPC64] Add support for gcc > 12 and clang > 12 #1520

Merged
merged 1 commit into from
Jun 23, 2023

Conversation

mtl1979
Copy link
Collaborator

@mtl1979 mtl1979 commented Jun 11, 2023

  • Use endianess-specific built-in function for gcc < 12 and clang
  • Fix build with clang 13, 14, 15 and 16
  • Fix detection for availability of Power9 intrinsics

@codecov
Copy link

codecov bot commented Jun 11, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: -1.06 ⚠️

Comparison is base (e5ab589) 83.90% compared to head (2a83cd7) 82.85%.

Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #1520      +/-   ##
===========================================
- Coverage    83.90%   82.85%   -1.06%     
===========================================
  Files          132      133       +1     
  Lines        10848    10964     +116     
  Branches      2792     2823      +31     
===========================================
- Hits          9102     9084      -18     
- Misses        1046     1121      +75     
- Partials       700      759      +59     
Flag Coverage Δ
macos_clang 42.97% <ø> (ø)
macos_gcc 73.69% <ø> (-0.03%) ⬇️
ubuntu_clang 82.53% <ø> (-0.01%) ⬇️
ubuntu_clang_debug ?
ubuntu_clang_inflate_allow_invalid_dist 81.95% <ø> (-0.24%) ⬇️
ubuntu_clang_inflate_strict 82.52% <ø> (-0.01%) ⬇️
ubuntu_clang_mmap 82.85% <ø> (-0.01%) ⬇️
ubuntu_clang_pigz 14.21% <ø> (-0.01%) ⬇️
ubuntu_clang_pigz_no_optim 11.61% <ø> (-0.01%) ⬇️
ubuntu_clang_pigz_no_threads 13.98% <ø> (-0.06%) ⬇️
ubuntu_clang_reduced_mem 82.70% <ø> (-0.01%) ⬇️
ubuntu_clang_toolchain_riscv ?
ubuntu_gcc ?
ubuntu_gcc_aarch64 77.43% <ø> (-0.02%) ⬇️
ubuntu_gcc_aarch64_compat_no_opt 75.70% <ø> (-0.04%) ⬇️
ubuntu_gcc_aarch64_no_acle 76.24% <ø> (-0.03%) ⬇️
ubuntu_gcc_aarch64_no_neon 76.24% <ø> (?)
ubuntu_gcc_armhf 77.50% <ø> (-0.02%) ⬇️
ubuntu_gcc_armhf_compat_no_opt 75.66% <ø> (-0.02%) ⬇️
ubuntu_gcc_armhf_no_acle 77.45% <ø> (-0.02%) ⬇️
ubuntu_gcc_armhf_no_neon 77.35% <ø> (-0.02%) ⬇️
ubuntu_gcc_armsf 74.82% <ø> (-0.01%) ⬇️
ubuntu_gcc_armsf_compat_no_opt 74.28% <ø> (-0.01%) ⬇️
ubuntu_gcc_benchmark 73.72% <ø> (+0.15%) ⬆️
ubuntu_gcc_compat_no_opt 76.88% <ø> (+<0.01%) ⬆️
ubuntu_gcc_compat_sprefix 72.85% <ø> (-1.07%) ⬇️
ubuntu_gcc_m32 73.38% <ø> (-0.01%) ⬇️
ubuntu_gcc_mingw_i686 ?
ubuntu_gcc_mingw_x86_64 73.60% <ø> (-0.01%) ⬇️
ubuntu_gcc_mips 75.07% <ø> (-0.01%) ⬇️
ubuntu_gcc_mips64 ?
ubuntu_gcc_no_avx2 74.35% <ø> (-0.09%) ⬇️
ubuntu_gcc_no_ctz 74.81% <ø> (-0.01%) ⬇️
ubuntu_gcc_no_ctzll 74.80% <ø> (-0.01%) ⬇️
ubuntu_gcc_no_pclmulqdq 74.34% <ø> (-0.03%) ⬇️
ubuntu_gcc_no_sse2 74.61% <ø> (-0.03%) ⬇️
ubuntu_gcc_no_sse42 74.79% <ø> (-0.03%) ⬇️
ubuntu_gcc_o1 74.24% <ø> (-0.03%) ⬇️
ubuntu_gcc_osb ∅ <ø> (∅)
ubuntu_gcc_pigz 38.28% <ø> (-0.04%) ⬇️
ubuntu_gcc_pigz_aarch64 39.31% <ø> (+0.08%) ⬆️
ubuntu_gcc_ppc 74.08% <0.00%> (-0.01%) ⬇️
ubuntu_gcc_ppc64 74.51% <100.00%> (-0.01%) ⬇️
ubuntu_gcc_ppc64_power9 74.69% <100.00%> (-0.01%) ⬇️
ubuntu_gcc_ppc64le 74.52% <100.00%> (-0.01%) ⬇️
ubuntu_gcc_ppc64le_novsx 74.91% <ø> (+<0.01%) ⬆️
ubuntu_gcc_ppc64le_power9 ?
ubuntu_gcc_ppc_no_power8 74.79% <ø> (+0.01%) ⬆️
ubuntu_gcc_s390x 74.96% <ø> (-0.01%) ⬇️
ubuntu_gcc_s390x_dfltcc 72.03% <ø> (-0.01%) ⬇️
ubuntu_gcc_s390x_dfltcc_compat 74.04% <ø> (-0.02%) ⬇️
ubuntu_gcc_s390x_no_crc32 74.75% <ø> (-0.01%) ⬇️
ubuntu_gcc_sparc64 74.89% <ø> (-0.01%) ⬇️
ubuntu_gcc_sprefix 73.40% <ø> (-0.01%) ⬇️
win64_gcc 74.14% <ø> (+0.03%) ⬆️
win64_gcc_compat_no_opt 74.88% <ø> (-0.01%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
arch/power/compare256_power9.c 100.00% <ø> (ø)
arch/power/power_features.c 70.00% <ø> (ø)
arch/power/chunkset_power8.c 100.00% <100.00%> (ø)

... and 33 files with indirect coverage changes

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@nmoinvaz nmoinvaz added Build Env Architecture Architecture specific labels Jun 11, 2023
@mtl1979 mtl1979 changed the title GCC 13 has broken __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb too for PowerPC64. Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 as gcc has broken semantics. Jun 11, 2023
@mtl1979
Copy link
Collaborator Author

mtl1979 commented Jun 11, 2023

@KungFuJesus

@KungFuJesus
Copy link
Contributor

KungFuJesus commented Jun 12, 2023

Hmm I feel like just bumping the gcc version here is not the best answer. I would like to know what gas is doing with {endian} in their intrinsic. Is it possible we just need to just use one of the two now?

Given the intrinsic is supposed to give you the instruction it's thinly veiling I wouldn't love that but it makes some sense maybe. I'd also be curious what clang generates.

@mtl1979
Copy link
Collaborator Author

mtl1979 commented Jun 12, 2023

Hmm I feel like just bumping the gcc version here is not the best answer. I would like to know what gas is doing with {endian} in their intrinsic. Is it possible we just need to just use one of the two now?

Given the intrinsic is supposed to give you the instruction it's thinly veiling I wouldn't love that but it makes some sense maybe. I'd also be curious what clang generates.

The latest code is basically using just code that is equivalent to one of the intrinsics. The code would get really ugly if we test endianess later in the file just for gcc < 12.

The "old" version didn't support compiling with clang, so there isn't anything to compare against...

@mtl1979 mtl1979 changed the title Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 as gcc has broken semantics. Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 for gcc < 12 Jun 12, 2023
@mtl1979 mtl1979 changed the title Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 for gcc < 12 Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 and gcc < 12 Jun 12, 2023
@mtl1979 mtl1979 force-pushed the gcc13-ppc64le branch 2 times, most recently from 00ac94c to 47d776a Compare June 12, 2023 08:24
@mtl1979 mtl1979 changed the title Don't use __builtin_vec_vctzlsbb and __builtin_vec_vclzlsbb for PowerPC64 and gcc < 12 [PPC64] Add support for gcc > 12 and clang > 11 Jun 12, 2023
@mtl1979 mtl1979 changed the title [PPC64] Add support for gcc > 12 and clang > 11 [PPC64] Add support for gcc > 12 and clang > 12 Jun 12, 2023
@mtl1979 mtl1979 force-pushed the gcc13-ppc64le branch 8 times, most recently from 14496b7 to 0c81bf8 Compare June 14, 2023 18:48
* Add support for cross-compiling using clang 13 and later for PowerPC64 little-endian and big-endian
* Fix detection for availability of Power9 intrinsics
@Dead2 Dead2 merged commit 7cda3bf into zlib-ng:develop Jun 23, 2023
129 of 136 checks passed
@Dead2 Dead2 mentioned this pull request Jun 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Architecture Architecture specific Build Env
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants