Implicitly enable evex512 if avx512 is enabled by nikic · Pull Request #121088 · rust-lang/rust (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation2 Commits1 Checks0 Files changed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
LLVM 18 requires the evex512 feature to allow use of zmm registers. LLVM automatically sets it when using a generic CPU, but not when -C target-cpu is specified. This will result either in backend legalization crashes, or code unexpectedly using ymm instead of zmm registers.
For now, make sure that avx512* features imply evex512. Long term we'll probably have to deal with the AVX10 mess somehow.
Fixes #121081.
r? @Amanieu
LLVM 18 requires the evex512 feature to allow use of zmm registers.
LLVM automatically sets it when using a generic CPU, but not when
-C target-cpu is specified. This will result either in backend
legalization crashes, or code unexpectedly using ymm instead of
zmm registers.
For now, make sure that avx512* features imply evex512. Long
term we'll probably have to deal with the AVX10 mess somehow.
rustbot added S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
Relevant to the compiler team, which will review and decide on the PR/issue.
labels
nikic mentioned this pull request
📌 Commit 369fff6 has been approved by Amanieu
It is now in the queue for this repository.
bors added S-waiting-on-bors
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
and removed S-waiting-on-review
Status: Awaiting review from the assignee but also interested parties.
labels
This was referenced
Feb 14, 2024
bors added a commit to rust-lang-ci/rust that referenced this pull request
…llaumeGomez
Rollup of 8 pull requests
Successful merges:
- rust-lang#120449 (Document requirements for unsized {Rc,Arc}::from_raw)
- rust-lang#120505 (Fix BTreeMap's Cursor::remove_{next,prev})
- rust-lang#120672 (std::thread update freebsd stack guard handling.)
- rust-lang#121088 (Implicitly enable evex512 if avx512 is enabled)
- rust-lang#121104 (Ignore unsized types when trying to determine the size of the original type)
- rust-lang#121107 (Fix msg for verbose suggestions with confusable capitalization)
- rust-lang#121113 (Continue compilation even if inherent impl checks fail)
- rust-lang#121120 (Add
ErrorGuaranteedtoast::LitKind::Err,token::LitKind::Err.)
r? @ghost
@rustbot modify labels: rollup
rust-timer added a commit to rust-lang-ci/rust that referenced this pull request
Rollup merge of rust-lang#121088 - nikic:evex512, r=Amanieu
Implicitly enable evex512 if avx512 is enabled
LLVM 18 requires the evex512 feature to allow use of zmm registers. LLVM automatically sets it when using a generic CPU, but not when -C target-cpu is specified. This will result either in backend legalization crashes, or code unexpectedly using ymm instead of zmm registers.
For now, make sure that avx512* features imply evex512. Long term we'll probably have to deal with the AVX10 mess somehow.
Fixes rust-lang#121081.
r? @Amanieu
nikic mentioned this pull request
2 tasks
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild MFC after: 3 days
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild MFC after: 3 days
(cherry picked from commit fcfb2d6)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild MFC after: 3 days
(cherry picked from commit fcfb2d6)
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild Approved by: re (cperciva) MFC after: 3 days
(cherry picked from commit fcfb2d6) (cherry picked from commit 14efb9b)
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild MFC after: 3 days
bsdjhb pushed a commit to bsdjhb/cheribsd that referenced this pull request
[X86][Driver] Do not add -evex512 for -march=native when the target doesn't support AVX512 (#91694)
This prevents problems with ports that fail to build with CPUTYPE=native, if the native CPU supports AVX512F, resulting in errors like:
/wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: always_inline function '_mm512_set1_epi8' requires target feature 'evex512', but would be inlined into function 'adler32_x86_avx512_vl512_vnni' that is compiled without support for 'evex512' 197 | const vec_t ones = VSET1_8(1); | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^ /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:197:21: error: AVX vector return of type '__m512i' (vector of 8 'long long' values) without 'evex512' enabled changes the ABI /wrkdirs/usr/ports/archivers/libdeflate/work/libdeflate-1.20/lib/x86/adler32_template.h:116:23: note: expanded from macro 'VSET1_8' 116 | # define VSET1_8(a) _mm512_set1_epi8(a) | ^
Ports known to be affected are: archivers/libdeflate, devel/highway, www/node20, and lang/rust.
(For rust itself there is also a similar issue reported at rust-lang/rust#121088).
PR: 276104 Reported by: netchild MFC after: 3 days
Labels
Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Relevant to the compiler team, which will review and decide on the PR/issue.