-
Notifications
You must be signed in to change notification settings - Fork 10.8k
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
[X86][AVX10] Fix a bug when using -march with no-evex512 attribute #72126
Conversation
failed to clear EVEX512 feature for intended intrinsics. Fixes llvm#72106
@llvm/pr-subscribers-clang @llvm/pr-subscribers-backend-x86 Author: Phoebe Wang (phoebewang) Changesfailed to clear EVEX512 feature for intended intrinsics. Fixes #72106 Full diff: https://github.com/llvm/llvm-project/pull/72126.diff 2 Files Affected:
diff --git a/clang/lib/Basic/Targets/X86.cpp b/clang/lib/Basic/Targets/X86.cpp
index eb127a8a11fffd5..acde3c1661748f0 100644
--- a/clang/lib/Basic/Targets/X86.cpp
+++ b/clang/lib/Basic/Targets/X86.cpp
@@ -122,7 +122,7 @@ bool X86TargetInfo::initFeatureMap(
std::vector<std::string> UpdatedAVX10FeaturesVec;
enum { FE_NOSET = -1, FE_FALSE, FE_TRUE };
int HasEVEX512 = FE_NOSET;
- bool HasAVX512F = false;
+ bool HasAVX512F = Features["avx512f"];
bool HasAVX10 = false;
bool HasAVX10_512 = false;
std::string LastAVX10;
diff --git a/clang/test/CodeGen/X86/pr72106.c b/clang/test/CodeGen/X86/pr72106.c
new file mode 100644
index 000000000000000..7ff4012f319b5b1
--- /dev/null
+++ b/clang/test/CodeGen/X86/pr72106.c
@@ -0,0 +1,10 @@
+// RUN: %clang_cc1 -ffreestanding -target-cpu cannonlake -emit-llvm < %s | FileCheck %s
+
+#include <immintrin.h>
+
+int main(int argc, char **argv) {
+ // CHECK-LABEL: @main
+ // CHECK: @llvm.masked.load.v4i64.p0
+ __m256i ptrs = _mm256_maskz_loadu_epi64(0, argv);
+ return 0;
+}
|
…t for test" This reverts commit 2124770. Do not initialize AVX10.1 features for now since it affects other lit tests.
i applied the proposed patch on top of latest and the build issues are gone. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
ok to land, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Interesting. LGTM
thanks for the fix, working great now. |
…lvm#72126) llvm#71318 failed to clear EVEX512 feature for intended intrinsics. Fixes llvm#72106
…ibute (llvm#72126)" This reverts commit 451c594. Revert due to buildbot fails.
#71318 failed to clear EVEX512 feature for intended intrinsics.
Fixes #72106