[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Shengchen Kan via cfe-commits
@@ -2613,6 +2614,24 @@ void CGBuilderInserter::InsertHelper( // called function. void CodeGenFunction::checkTargetFeatures(const CallExpr *E, const FunctionDecl *TargetDecl) { + // SemaCheking cannot handle below x86 builtins because

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Shengchen Kan via cfe-commits
KanRobert wrote: My understanding is that you change the required feature of __builtin_ia32_cmp[p|s][s|d] from avx to sse for some condition codes. The title is not accurate. https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Shengchen Kan via cfe-commits
@@ -462,12 +462,12 @@ TARGET_BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufpd256, "V4dV4dV4dIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufps256, "V8fV8fV8fIi", "ncV:256:", "avx")

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -1719,3 +1719,57 @@ __m128i test_mm_xor_si128(__m128i A, __m128i B) { // CHECK: xor <2 x i64> %{{.*}}, %{{.*}} return _mm_xor_si128(A, B); } + +__m128d test_mm_cmp_pd_eq_oq(__m128d a, __m128d b) { RKSimon wrote: Sorting

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -462,12 +462,12 @@ TARGET_BUILTIN(__builtin_ia32_blendvps256, "V8fV8fV8fV8f", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufpd256, "V4dV4dV4dIi", "ncV:256:", "avx") TARGET_BUILTIN(__builtin_ia32_shufps256, "V8fV8fV8fIi", "ncV:256:", "avx")

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Should we update the existing SSE/SSE2 cmpeq/cmplt intinsics to use __builtin_ia32_cmp* instead of __builtin_ia32_cmpeq??/__builtin_ia32_cmplt?? etc? https://github.com/llvm/llvm-project/pull/84136 ___

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -2613,6 +2614,24 @@ void CGBuilderInserter::InsertHelper( // called function. void CodeGenFunction::checkTargetFeatures(const CallExpr *E, const FunctionDecl *TargetDecl) { + // SemaCheking cannot handle below x86 builtins because

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -813,3 +813,57 @@ __m128 test_mm_xor_ps(__m128 A, __m128 B) { // CHECK: xor <4 x i32> return _mm_xor_ps(A, B); } + +__m128 test_mm_cmp_ps_eq_oq(__m128 a, __m128 b) { RKSimon wrote: Move these up (they should be approximately alpha sorted)

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
FreddyLeaf wrote: The difference with #67410 is here: 54c78b5ad694946186ba115576a6eea9c8992349 https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
@@ -15,7 +15,7 @@ int baz(__m256i a) { #if NEED_AVX_2 __m128 need_avx(__m128 a, __m128 b) { - return _mm_cmp_ps(a, b, 0); // expected-error {{'__builtin_ia32_cmpps' needs target feature avx}} + return _mm_cmp_ps(a, b, 8); // expected-error {{'__builtin_ia32_cmpps' needs

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread via cfe-commits
github-actions[bot] wrote: :warning: C/C++ code formatter, clang-format found issues in your code. :warning: You can test this locally with the following command: ``bash git-clang-format --diff 9a894e7d84892489826375f94c08ab16ccacc4bb 54c78b5ad694946186ba115576a6eea9c8992349 --

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf edited https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread via cfe-commits
llvmbot wrote: @llvm/pr-subscribers-clang-codegen Author: Freddy Ye (FreddyLeaf) Changes - [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 - Handle attribute/target --- Patch is 38.00 KiB, truncated to 20.00 KiB below, full version:

[clang] [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 (PR #84136)

2024-03-06 Thread Freddy Ye via cfe-commits
https://github.com/FreddyLeaf created https://github.com/llvm/llvm-project/pull/84136 - [X86] Change target of __builtin_ia32_cmp[p|s][s|d] from avx into sse/sse2 - Handle attribute/target >From 2ba698b222fa1dc963d21850d5931562aa65533d Mon Sep 17 00:00:00 2001 From: Freddy Ye Date: Tue, 26