[clang] [clang] Add `intrin0.h` header to mimic `intrin0.h` used by MSVC STL for clang-cl (PR #75711)

2023-12-19 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @MaxEW707 If you pull out the adcintrin.h change into a separate PR we can fast track it as it should be done anyhow https://github.com/llvm/llvm-project/pull/75711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86] Emit Warnings for frontend options to enable knl/knm. (PR #75580)

2023-12-19 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Can you give me a better idea of the stages you intend to follow with this. The patch title suggests removing all KNL/KNM handling but the patch itself looks to be just about the KNL/KNM specific features. Removing the (incomplete) KNL/KNM specific features (ER/PF/etc) I don't

[clang] [compiler-rt] [llvm] [lld] [libc] [flang] [libcxx] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-23 Thread Simon Pilgrim via cfe-commits
@@ -7254,6 +7255,10 @@ static SDValue lowerBuildVectorAsBroadcast(BuildVectorSDNode *BVOp, EVT CVT = Ld.getValueType(); assert(!CVT.isVector() && "Must not broadcast a vector type"); +// 512 bit vpbroadcastw is only available with AVX512BW +if (ScalarSize ==

[libcxx] [llvm] [compiler-rt] [libc] [lld] [clang] [flang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-23 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Remove NetBSD/i386 workaround for FP eval method with older versions (PR #74025)

2023-12-01 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: This should be documented in the release notes in case somebody was still building for such an old netbsd. Should we emit any compile warnings/errors when building for this triple? https://github.com/llvm/llvm-project/pull/74025 ___

[libcxx] [flang] [clang] [llvm] [libc] [compiler-rt] [lld] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-24 Thread Simon Pilgrim via cfe-commits
@@ -881,6 +881,23 @@ static bool isEndbrImm64(uint64_t Imm) { return false; } +static bool needBWI(MVT VT) { + return (VT == MVT::v32i16 || VT == MVT::v32f16 || VT == MVT::v64i8); +} + +static MVT getNarrowType(MVT VT) { + if (VT == MVT::v32i16) +return MVT::v16i16; +

[clang] [llvm] [lld] [compiler-rt] [libcxx] [libc] [flang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-24 Thread Simon Pilgrim via cfe-commits
@@ -986,15 +1003,15 @@ void X86DAGToDAGISel::PreprocessISelDAG() { case X86ISD::VBROADCAST: { MVT VT = N->getSimpleValueType(0); // Emulate v32i16/v64i8 broadcast without BWI. - if (!Subtarget->hasBWI() && (VT == MVT::v32i16 || VT == MVT::v64i8)) { -

[llvm] [lld] [compiler-rt] [libcxx] [libc] [flang] [clang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon edited https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [compiler-rt] [lld] [llvm] [libc] [clang] [libcxx] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-24 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Just a couple of minors https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [libc] [libcxx] [compiler-rt] [llvm] [lld] [flang] Fix ISel crash when lowering BUILD_VECTOR (PR #73186)

2023-11-27 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/73186 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[libc] [clang-tools-extra] [llvm] [compiler-rt] [clang] [lldb] [lld] [flang] [libcxx] [libunwind] [X86] Use RORX over SHR imm (PR #77964)

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

[clang] [libunwind] [libcxx] [flang] [compiler-rt] [clang-tools-extra] [libc] [lldb] [llvm] [lld] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[libunwind] [clang-tools-extra] [libc] [flang] [lldb] [lld] [compiler-rt] [libcxx] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[libc] [lld] [clang-tools-extra] [libcxx] [libunwind] [compiler-rt] [lldb] [flang] [llvm] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. https://github.com/llvm/llvm-project/pull/77964 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [libcxx] [flang] [lldb] [llvm] [libunwind] [compiler-rt] [lld] [libc] [clang] [X86] Use RORX over SHR imm (PR #77964)

2024-01-25 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,97 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[libcxx] [flang] [libc] [clang-tools-extra] [clang] [llvm] [compiler-rt] [libunwind] [lld] [lldb] [X86] Use RORX over SHR imm (PR #77964)

2024-01-28 Thread Simon Pilgrim via cfe-commits
@@ -4216,6 +4217,95 @@ MachineSDNode *X86DAGToDAGISel::emitPCMPESTR(unsigned ROpc, unsigned MOpc, return CNode; } +// When the consumer of a right shift (arithmetic or logical) wouldn't notice +// the difference if the instruction was a rotate right instead (because the

[llvm] [clang] [compiler-rt] [X86] Support more ISAs to enable __builtin_cpu_supports (PR #79086)

2024-02-01 Thread Simon Pilgrim via cfe-commits
@@ -139,20 +139,77 @@ enum ProcessorFeatures { FEATURE_AVX512BITALG, FEATURE_AVX512BF16, FEATURE_AVX512VP2INTERSECT, + FEATURE_3DNOW, + FEATURE_ADX = 40, + FEATURE_CLDEMOTE = 42, RKSimon wrote: Maybe leave in a commented out entry to make that clear?

[compiler-rt] [clang] [flang] [llvm] [clang-tools-extra] [TTI]Fallback to SingleSrcPermute shuffle kind, if no direct estimation for (PR #79837)

2024-02-01 Thread Simon Pilgrim via cfe-commits
@@ -2,15 +2,15 @@ ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output -cost-kind=latency -mattr=+sse2 | FileCheck %s -check-prefixes=SSE,SSE2 ; RUN: opt < %s -mtriple=x86_64-unknown-linux-gnu -passes="print" 2>&1 -disable-output

[llvm] [clang] [polly] [X86] Remove Intel Xeon Phi Supports. (PR #76383)

2024-02-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @FreddyLeaf Can this be abandoned now? https://github.com/llvm/llvm-project/pull/76383 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang-tools-extra] [clang] [llvm] [X86] Use plain load/store instead of cmpxchg16b for atomics with AVX (PR #74275)

2024-02-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please can you confirm we have tests for underaligned pointers? https://github.com/llvm/llvm-project/pull/74275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Adding support of AMDLIBM vector library (PR #78560)

2024-01-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,332 @@ +; RUN: opt -vector-library=AMDLIBM -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s + +; Test to verify that when math headers are built with +; __FINITE_MATH_ONLY__ enabled, causing use of ___finite +; function versions, vectorization can map

[clang] [Clang] Amend SME attributes with support for ZT0. (PR #77941)

2024-01-23 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @sdesmalen-arm This appears to be failing on some buildbots: https://lab.llvm.org/buildbot/#/builders/176/builds/8232 ``` llvm-lit: /home/tcwg-buildbot/worker/clang-aarch64-sve-vls-2stage/llvm/llvm/utils/lit/lit/TestingConfig.py:152: fatal: unable to parse config file

[clang] [llvm] [clang-tools-extra] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
@@ -3779,65 +3780,169 @@ static void reorderOrder(SmallVectorImpl , ArrayRef Mask, std::optional BoUpSLP::findReusedOrderedScalars(const BoUpSLP::TreeEntry ) { assert(TE.State == TreeEntry::NeedToGather && "Expected gather node only."); - unsigned NumScalars =

[llvm] [clang] [clang-tools-extra] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
@@ -858,7 +858,7 @@ static void addMask(SmallVectorImpl , ArrayRef SubMask, /// values 3 and 7 respectively: /// before: 6 9 5 4 9 2 1 0 /// after: 6 3 5 4 7 2 1 0 -static void fixupOrderingIndices(SmallVectorImpl ) { +static void fixupOrderingIndices(MutableArrayRef

[clang] [clang-tools-extra] [llvm] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
@@ -3779,65 +3780,169 @@ static void reorderOrder(SmallVectorImpl , ArrayRef Mask, std::optional BoUpSLP::findReusedOrderedScalars(const BoUpSLP::TreeEntry ) { assert(TE.State == TreeEntry::NeedToGather && "Expected gather node only."); - unsigned NumScalars =

[clang-tools-extra] [llvm] [clang] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
@@ -2418,7 +2418,8 @@ class BoUpSLP { std::optional isGatherShuffledSingleRegisterEntry( const TreeEntry *TE, ArrayRef VL, MutableArrayRef Mask, - SmallVectorImpl , unsigned Part); + SmallVectorImpl , unsigned Part, + bool ForOrder);

[llvm] [clang-tools-extra] [clang] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please can you add better comments explaining the process https://github.com/llvm/llvm-project/pull/77529 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang-tools-extra] [clang] [llvm] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

2024-01-30 Thread Simon Pilgrim via cfe-commits
@@ -2432,7 +2433,7 @@ class BoUpSLP { isGatherShuffledEntry( const TreeEntry *TE, ArrayRef VL, SmallVectorImpl , SmallVectorImpl> , - unsigned NumParts); + unsigned NumParts, bool ForOrder = false); RKSimon wrote: Add ForOrder to the

[llvm] [clang] [clang-tools-extra] [SLP]Improve findReusedOrderedScalars and graph rotation. (PR #77529)

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

[libcxx] [llvm] [libc] [compiler-rt] [lldb] [clang-tools-extra] [mlir] [clang] [flang] [AArch64] add intrinsic to generate a bfi instruction (PR #79672)

2024-01-29 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @RamaMalladiAWS Do you have examples of the IR that fails to lower to BFI? These things often turn out to be either a missing middle-end canonicalization or maybe a case that could be added to existing pattern matching in the back-end.

[llvm] [clang] Adding support of AMDLIBM vector library (PR #78560)

2024-01-31 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,332 @@ +; RUN: opt -vector-library=AMDLIBM -passes=inject-tli-mappings,loop-vectorize -S < %s | FileCheck %s + +; Test to verify that when math headers are built with +; __FINITE_MATH_ONLY__ enabled, causing use of ___finite +; function versions, vectorization can map

[clang] [X86][AVX10] Fix a bug when using -march with no-evex512 attribute (PR #72126)

2023-11-13 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/72126 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] 8d72079 - Fix MSVC "not all control paths return a value" warning. NFC.

2023-11-08 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2023-11-08T10:45:20Z New Revision: 8d72079077f8b8bf4a8d7173edbb09be083d975b URL: https://github.com/llvm/llvm-project/commit/8d72079077f8b8bf4a8d7173edbb09be083d975b DIFF: https://github.com/llvm/llvm-project/commit/8d72079077f8b8bf4a8d7173edbb09be083d975b.diff

[clang] d50dec6 - Fix MSVC "not all control paths return a value" warnings. NFC.

2024-03-01 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-03-01T09:57:09Z New Revision: d50dec6f413ce1953bede94bdd11261b6684c7c4 URL: https://github.com/llvm/llvm-project/commit/d50dec6f413ce1953bede94bdd11261b6684c7c4 DIFF: https://github.com/llvm/llvm-project/commit/d50dec6f413ce1953bede94bdd11261b6684c7c4.diff

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @pogo This doesn't match what we did for the various cmp intrinsics in emmintrin.h - should it? ```cpp /// Compares each of the corresponding signed 32-bit values of the ///128-bit integer vectors to determine if the values in the first operand ///are greater than those

[clang] [llvm] [X86] Use generic CPU tuning when tune-cpu is empty (PR #83631)

2024-03-02 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Please check the CI - these failures look relevant ``` Failed Tests (4): lld :: COFF/lto-cpu-string.ll lld :: COFF/lto.ll lld :: ELF/lto/cpu-string.ll lld :: MachO/lto-cpu-string.ll ``` https://github.com/llvm/llvm-project/pull/83631

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

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -2940,6 +2940,134 @@ _mm_movemask_ps(__m128 __a) return __builtin_ia32_movmskps((__v4sf)__a); } +/* Compare */ +#define _CMP_EQ_OQ0x00 /* Equal (ordered, non-signaling) */ +#define _CMP_LT_OS0x01 /* Less-than (ordered, signaling) */ +#define _CMP_LE_OS0x02

[clang] [Headers][X86] Add specific results to comparisons (PR #83316)

2024-03-08 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: > @RKSimon note this will affect what the tooltips show. Is that okay? I think so - we're just losing the extra info about -1/0 or 1/0 result values? https://github.com/llvm/llvm-project/pull/83316 ___ cfe-commits mailing list

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

2024-03-08 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - but @pogo59 needs a headup as it will affect some ongoing documentation cleanup work https://github.com/llvm/llvm-project/pull/84136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86_64] fix arg pass error in struct. (PR #85394)

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

[clang] [compiler-rt] [flang] [libc] [libcxx] [lldb] [llvm] [mlir] [X86] Fast AVX-512-VNNI vpdpwssd tuning (PR #85033)

2024-03-14 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon requested changes to this pull request. This patch needs to be cleanly rebased on trunk (force push is OK in PR branchs) https://github.com/llvm/llvm-project/pull/85033 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86][Headers] Specify result of NaN comparisons (PR #85862)

2024-03-21 Thread Simon Pilgrim via cfe-commits
@@ -207,6 +207,8 @@ _mm256_div_ps(__m256 __a, __m256 __b) /// Compares two 256-bit vectors of [4 x double] and returns the greater ///of each pair of values. /// +///If either value in a comparison is NaN, returns the value from \a __b. RKSimon wrote:

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-03-21 Thread Simon Pilgrim via cfe-commits
Pol Marcet =?utf-8?q?Sard=C3=A0?= , Pol Marcet =?utf-8?q?Sard=C3=A0?= ,Pol M Message-ID: In-Reply-To: RKSimon wrote: @Destroyerrrocket reverse-ping - are you still working on this? https://github.com/llvm/llvm-project/pull/76615 ___ cfe-commits

[clang] 7812fcf - [VectorCombine] foldBitcastShuf - add support for binary shuffles (REAPPLIED)

2024-03-20 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-03-20T15:06:19Z New Revision: 7812fcf3d79ef7fe9ec6bcdfc8fd9143864956cb URL: https://github.com/llvm/llvm-project/commit/7812fcf3d79ef7fe9ec6bcdfc8fd9143864956cb DIFF: https://github.com/llvm/llvm-project/commit/7812fcf3d79ef7fe9ec6bcdfc8fd9143864956cb.diff

[clang] 25d61be - [X86] avx-shuffle-builtins.c - limit to x86 targets

2024-03-20 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-03-20T16:59:11Z New Revision: 25d61be8a5e563988661709c5d01f67c06b388e2 URL: https://github.com/llvm/llvm-project/commit/25d61be8a5e563988661709c5d01f67c06b388e2 DIFF: https://github.com/llvm/llvm-project/commit/25d61be8a5e563988661709c5d01f67c06b388e2.diff

[clang] [clang][dataflow] Fix u8 string error with C++20. (PR #84302)

2024-03-07 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM - cheers https://github.com/llvm/llvm-project/pull/84302 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [dataflow][nfc] Fix u8 string usage with c++20 (PR #84291)

2024-03-07 Thread Simon Pilgrim via cfe-commits
@@ -500,7 +500,7 @@ class HTMLLogger : public Logger { for (unsigned I = 0; I < CFG.getNumBlockIDs(); ++I) { std::string Name = blockID(I); // Rightwards arrow, vertical line - char ConvergenceMarker[] = u8"\\n\u2192\u007c"; + char ConvergenceMarker[]

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

2024-03-07 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] [llvm] [X86] Add Support for X86 TLSDESC Relocations (PR #83136)

2024-03-06 Thread Simon Pilgrim via cfe-commits
@@ -18515,20 +18515,20 @@ X86TargetLowering::LowerGlobalAddress(SDValue Op, SelectionDAG ) const { return LowerGlobalOrExternal(Op, DAG, /*ForCall=*/false); } -static SDValue -GetTLSADDR(SelectionDAG , SDValue Chain, GlobalAddressSDNode *GA, - SDValue *InGlue,

[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 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
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
@@ -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
@@ -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
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] [clang-format] Lambda parameter should be passed by const reference (PR #87306)

2024-04-02 Thread Simon Pilgrim via cfe-commits
@@ -3578,7 +3578,7 @@ cleanupAroundReplacements(StringRef Code, const tooling::Replacements , // We need to use lambda function here since there are two versions of // `cleanup`. auto Cleanup = [](const FormatStyle , StringRef Code, -std::vector

[clang] 4ae33c5 - Fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFC.

2024-04-09 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-09T09:59:57+01:00 New Revision: 4ae33c52f794dbd64924dd006570cdc409c297bc URL: https://github.com/llvm/llvm-project/commit/4ae33c52f794dbd64924dd006570cdc409c297bc DIFF: https://github.com/llvm/llvm-project/commit/4ae33c52f794dbd64924dd006570cdc409c297bc.diff

[clang] 0e87366 - TextNodeDumper.cpp - remove empty switch to fix MSVC "switch statement contains 'default' but no 'case' labels" warning. NFC.

2024-04-08 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-08T14:31:46+01:00 New Revision: 0e8736694f752898ed7957a11a11c42f8f6a98d1 URL: https://github.com/llvm/llvm-project/commit/0e8736694f752898ed7957a11a11c42f8f6a98d1 DIFF: https://github.com/llvm/llvm-project/commit/0e8736694f752898ed7957a11a11c42f8f6a98d1.diff

[clang] f139387 - Fix MSVC "not all control paths return a value" warning. NFC.

2024-04-08 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-08T14:31:46+01:00 New Revision: f139387fb6e76a5249e8d7c2d124565e6b566ef4 URL: https://github.com/llvm/llvm-project/commit/f139387fb6e76a5249e8d7c2d124565e6b566ef4 DIFF: https://github.com/llvm/llvm-project/commit/f139387fb6e76a5249e8d7c2d124565e6b566ef4.diff

[clang] 110e933 - CGOpenMPRuntime.cpp - fix Wparentheses warning. NFC.

2024-04-04 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-04T14:59:00+01:00 New Revision: 110e933b7ae9150710a48b586fd3da39439079c2 URL: https://github.com/llvm/llvm-project/commit/110e933b7ae9150710a48b586fd3da39439079c2 DIFF: https://github.com/llvm/llvm-project/commit/110e933b7ae9150710a48b586fd3da39439079c2.diff

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-10 Thread Simon Pilgrim via cfe-commits
@@ -22,7 +22,11 @@ class FunctionPointer final { const Function *Func; public: - FunctionPointer() : Func(nullptr) {} + // FIXME: We might want to track the fact that the Function pointer + // has been created from an integer and is most likely garbage anyway. +

[clang] 798e04f - Fix MSVC "not all control paths return a value" warning. NFC.

2024-04-10 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-10T17:50:13+01:00 New Revision: 798e04f93769318db857b27f51020e7115e00301 URL: https://github.com/llvm/llvm-project/commit/798e04f93769318db857b27f51020e7115e00301 DIFF: https://github.com/llvm/llvm-project/commit/798e04f93769318db857b27f51020e7115e00301.diff

[clang] [clang] Constexpr for __builtin_shufflevector and __builtin_convertvector (PR #76615)

2024-04-15 Thread Simon Pilgrim via cfe-commits
Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= , Pol Marcet =?utf-8?q?Sardà?= Message-ID: In-Reply-To: RKSimon wrote: Other than fixing the ReleaseNotes.rst conflict is there anything outstanding on this now? https://github.com/llvm/llvm-project/pull/76615

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,64 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s RKSimon wrote: Please can you add the i686

[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-20 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/89551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]MveEmitter: Pass Args as a const reference (PR #89551)

2024-04-22 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89551 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang]MveEmitter:Pass Args as const references (PR #89202)

2024-04-21 Thread Simon Pilgrim via cfe-commits
@@ -728,7 +728,7 @@ class IRIntrinsicResult : public Result { std::vector ParamTypes; std::vector Args; IRIntrinsicResult(StringRef IntrinsicID, std::vector ParamTypes, RKSimon wrote: std::vector ParamTypes?

[clang] [clang]MveEmitter:Pass Args as const references (PR #89202)

2024-04-21 Thread Simon Pilgrim via cfe-commits
@@ -660,7 +660,7 @@ class IRBuilderResult : public Result { std::map IntegerArgs; IRBuilderResult(StringRef CallPrefix, std::vector Args, std::set AddressArgs, RKSimon wrote: std::set AddressArgs?

[clang] [clang]MveEmitter:Pass Args as const references (PR #89202)

2024-04-21 Thread Simon Pilgrim via cfe-commits
@@ -660,7 +660,7 @@ class IRBuilderResult : public Result { std::map IntegerArgs; IRBuilderResult(StringRef CallPrefix, std::vector Args, RKSimon wrote: std::vector Args? https://github.com/llvm/llvm-project/pull/89202

[clang] [clang][Interp] Integral pointers (PR #84159)

2024-04-11 Thread Simon Pilgrim via cfe-commits
@@ -22,7 +22,11 @@ class FunctionPointer final { const Function *Func; public: - FunctionPointer() : Func(nullptr) {} + // FIXME: We might want to track the fact that the Function pointer + // has been created from an integer and is most likely garbage anyway. +

[clang] 6fd2fdc - [VectorCombine] foldShuffleOfCastops - extend shuffle(bitcast(x),bitcast(y)) -> bitcast(shuffle(x,y)) support

2024-04-11 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-04-11T14:02:56+01:00 New Revision: 6fd2fdccf2f28fc155f614eec41f785492aad618 URL: https://github.com/llvm/llvm-project/commit/6fd2fdccf2f28fc155f614eec41f785492aad618 DIFF: https://github.com/llvm/llvm-project/commit/6fd2fdccf2f28fc155f614eec41f785492aad618.diff

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-04-19 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,97 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck %s +// RUN: %clang_cc1 -triple i686-linux-gnu -target-cpu core2

[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] cppcheck: use move semantics for 'NodeKinds' and update possible callers to use it (PR #87273)

2024-04-19 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @Amila-Rukshan please can you rebase this patch? merge is currently failing https://github.com/llvm/llvm-project/pull/87273 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please update the PR subject as its a lot more than just X86AsmParser.cpp https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp:3804: lacking () for c… (PR #90391)

2024-04-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Please address the clang-format warnings the CI has reported https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-05-01 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,69 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 4 +// RUN: %clang_cc1 -triple x86_64-linux-gnu -target-cpu core2 %s -S -emit-llvm -o - | FileCheck -check-prefixes=CHECK,CHECK64 %s +// RUN: %clang_cc1 -triple

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

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

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-05-01 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang][CodeGen] Optimised LLVM IR for atomic increments/decrements on floats (PR #89362)

2024-05-02 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/89362 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-04 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon closed https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [compiler-rt] [libc] [libclc] [libcxxabi] [lld] [lldb] [llvm] [mlir] Add clarifying parenthesis around non-trivial conditions in ternary expressions. (PR #90391)

2024-05-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90391 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

<    4   5   6   7   8   9