[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-10 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: > > How easy would it be to add an option for this to update inline asm? I'm > > not asking you to do this here, I just want to know if this approach would > > make it straightforward to add in the future. > > Should we touch the inline asm? (GCC doesn't

[clang] [llvm] [X86][MC] Added support for -msse2avx option in llvm-mc (PR #96860)

2024-07-09 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: How easy would it be to add an option for this to update inline asm? I'm not asking you to do this here, I just want to know if this approach would make it straightforward to add in the future. https://github.com/llvm/llvm-project/pull/96860

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

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

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

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

[clang] [llvm] [X86] Support branch hint (PR #97721)

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

[clang] [llvm] Support branch hint (PR #97721)

2024-07-04 Thread Simon Pilgrim via cfe-commits
@@ -749,6 +749,11 @@ def TuningUseGLMDivSqrtCosts : SubtargetFeature<"use-glm-div-sqrt-costs", "UseGLMDivSqrtCosts", "true", "Use Goldmont specific floating point div/sqrt costs">; +// Starting with Redwood Cove architecture, the branch has branch taken hint +//

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-03 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: SGTM with a few minors https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-03 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,247 @@ +//=== X86FixupBufferSecurityCheck.cpp Fix Buffer Security Check Call---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-03 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,247 @@ +//=== X86FixupBufferSecurityCheck.cpp Fix Buffer Security Check Call---===// +// +// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. +// See https://llvm.org/LICENSE.txt for license information. +// SPDX-License-Identifier:

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-03 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,247 @@ +//=== X86FixupBufferSecurityCheck.cpp Fix Buffer Security Check Call---===// RKSimon wrote: X86WinFixupBufferSecurityCheck.cpp https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-02 Thread Simon Pilgrim via cfe-commits
@@ -0,0 +1,248 @@ +//=== X86FixupBufferSecurityCheck.cpp Fix Buffer Security Check Call RKSimon wrote: Fix filename and '===// 'comment overflow https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-07-02 Thread Simon Pilgrim via cfe-commits
@@ -48,6 +48,7 @@ set(sources X86AvoidStoreForwardingBlocks.cpp X86DynAllocaExpander.cpp X86FixupSetCC.cpp + X86WinFixupBufferSecurityCheck.cpp RKSimon wrote: (style) alpha sorting https://github.com/llvm/llvm-project/pull/95904

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

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

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-28 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Cheers - I'll push this (without the assert) in a moment - that shouldn't get in the way of working out why they aren't always paired. https://github.com/llvm/llvm-project/pull/96888 ___ cfe-commits mailing list

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-28 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/96888 >From 7f6614d8df9a5ed2027f90d813695bc43f1044b2 Mon Sep 17 00:00:00 2001 From: Simon Pilgrim Date: Thu, 27 Jun 2024 11:09:32 +0100 Subject: [PATCH] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo

[clang] [NFC] use appropriate castas (PR #95272)

2024-06-28 Thread Simon Pilgrim via cfe-commits
@@ -2834,7 +2834,7 @@ ABIArgInfo X86_64ABIInfo::classifyRegCallStructTypeImpl(QualType Ty, unsigned , unsigned , unsigned ) const { - auto RT = Ty->getAs(); + auto RT = Ty->castAs();

[clang] 4d167fb - [Sema] TransformTypeOfExprType / TransformTypeOfType - don't dereference getAs<> results

2024-06-27 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-06-27T13:09:48+01:00 New Revision: 4d167fb28b8c8b2e278fb09b1c435db6d6393d56 URL: https://github.com/llvm/llvm-project/commit/4d167fb28b8c8b2e278fb09b1c435db6d6393d56 DIFF: https://github.com/llvm/llvm-project/commit/4d167fb28b8c8b2e278fb09b1c435db6d6393d56.diff

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-27 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: It would probably explain why the typo hasn't caused regression - I'm going off static analysis reports here, not crash reports. https://github.com/llvm/llvm-project/pull/96888 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] 286955c - [Sema] HLSLCompareFloatingRank - don't dereference getAs<> results

2024-06-27 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-06-27T12:29:55+01:00 New Revision: 286955caa32b5b9fd959176c85ffb925e8093a0d URL: https://github.com/llvm/llvm-project/commit/286955caa32b5b9fd959176c85ffb925e8093a0d DIFF: https://github.com/llvm/llvm-project/commit/286955caa32b5b9fd959176c85ffb925e8093a0d.diff

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -82,6 +94,8 @@ define void @tailcall_unrelated_frame() sspreq { ; LINUX-NEXT: .LBB1_2: # %CallStackCheckFailBlk ; LINUX-NEXT:.cfi_def_cfa_offset 16 ; LINUX-NEXT:callq __stack_chk_fail@PLT + + RKSimon wrote: superfluous

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -114,250 +25,93 @@ return:; preds = %entry declare void @escape(ptr) define void @test_vla(i32 %n) nounwind ssp { -; MSVC-X86-LABEL: test_vla: -; MSVC-X86: # %bb.0: -; MSVC-X86-NEXT:pushl %ebp -; MSVC-X86-NEXT:movl %esp, %ebp -; MSVC-X86-NEXT:pushl

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-27 Thread Simon Pilgrim via cfe-commits
@@ -9,95 +9,6 @@ @"\01LC" = internal constant [11 x i8] c"buf == %s\0A\00"; [#uses=1] define void @test(ptr %a) nounwind ssp { -; MSVC-X86-LABEL: test: RKSimon wrote: where did the test checks go? https://github.com/llvm/llvm-project/pull/95904

[clang] [Sema] LambdaScopeForCallOperatorInstantiationRAII - fix typo in early out logic (PR #96888)

2024-06-27 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon created https://github.com/llvm/llvm-project/pull/96888 We should be checking for a failed dyn_cast on the ParentFD result - not the loop invariant FD root value. Seems to have been introduced in #65193 Noticed by static analyser (I have no specific test case).

[clang] [llvm] Remove mmx 3dnow (PR #96246)

2024-06-25 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: > > So can we get all the mmx patches done in time for the 19.0 branch? > > Maybe? Depends on how the discussion on the other PR goes -- whether that > proposal is acceptable, or if a different transition strategy is desired. Apart from #96540 how many more patches do you

[clang] [llvm] Clang: convert `__m64` intrinsics to unconditionally use SSE2 instead of MMX. (PR #96540)

2024-06-25 Thread Simon Pilgrim via cfe-commits
@@ -21,10 +21,29 @@ typedef int __v2si __attribute__((__vector_size__(8))); typedef short __v4hi __attribute__((__vector_size__(8))); typedef char __v8qi __attribute__((__vector_size__(8))); RKSimon wrote: Add a deprecation message if SSE2 is not defined or

[clang] [llvm] Clang: convert `__m64` intrinsics to unconditionally use SSE2 instead of MMX. (PR #96540)

2024-06-25 Thread Simon Pilgrim via cfe-commits
@@ -614,12 +623,15 @@ _mm_shuffle_epi8(__m128i __a, __m128i __b) ///1: Clear the corresponding byte in the destination. \n ///0: Copy the selected source byte to the corresponding byte in the ///destination. \n -///Bits [3:0] select the source byte to be

[clang] [llvm] [X86][CodeGen] security check cookie execute only when needed (PR #95904)

2024-06-24 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @mahesh-attarde please can you rebase against trunk - I've cleaned up the test checks to help with the codegen diff https://github.com/llvm/llvm-project/pull/95904 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] Remove mmx 3dnow (PR #96246)

2024-06-21 Thread Simon Pilgrim via cfe-commits
@@ -1825,32 +1818,32 @@ def : ProcModel; -def : Proc<"k6-2", [FeatureX87, FeatureCX8, Feature3DNow], +def : Proc<"k6-2", [FeatureX87, FeatureCX8, FeatureMMX], RKSimon wrote: I think the best we can do is add FeaturePRFCHW as well?

[clang] 35bfbb3 - [clang][AST] createNestedNameSpecifierForScopeOf - don't use dyn_cast_or_null on never null DC argument

2024-06-21 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-06-21T17:42:00+01:00 New Revision: 35bfbb3b21e9874d03b730e8ce4eb98b1dcd2d28 URL: https://github.com/llvm/llvm-project/commit/35bfbb3b21e9874d03b730e8ce4eb98b1dcd2d28 DIFF: https://github.com/llvm/llvm-project/commit/35bfbb3b21e9874d03b730e8ce4eb98b1dcd2d28.diff

[clang] [clang][Sema] Fix a bug when instantiating a lambda with requires clause (PR #65193)

2024-06-21 Thread Simon Pilgrim via cfe-commits
@@ -2296,33 +2296,55 @@ ExprResult Sema::BuildBlockForLambdaConversion(SourceLocation CurrentLocation, return BuildBlock; } +static FunctionDecl *getPatternFunctionDecl(FunctionDecl *FD) { + if (FD->getTemplatedKind() == FunctionDecl::TK_MemberSpecialization) { +while

[clang] [llvm] Remove mmx 3dnow (PR #96246)

2024-06-21 Thread Simon Pilgrim via cfe-commits
@@ -1825,32 +1818,32 @@ def : ProcModel; -def : Proc<"k6-2", [FeatureX87, FeatureCX8, Feature3DNow], +def : Proc<"k6-2", [FeatureX87, FeatureCX8], RKSimon wrote: These still need FeatureMMX and SSEPrefetch (or a similar flag)

[clang] [llvm] Remove mmx 3dnow (PR #96246)

2024-06-21 Thread Simon Pilgrim via cfe-commits
@@ -7,151 +7,16 @@ *===---=== */ +// 3dNow intrinsics are no longer supported, and this header remains only as a +// stub for users who were including it to get to _m_prefetch or +// _m_prefetchw. Such uses

[clang] [llvm] Remove mmx 3dnow (PR #96246)

2024-06-21 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: I'd prefer we rip off ALL the 3dnow/mmx bandaid in one big series of patches - and not split across the 19.X/20.X releases. So can we get all the mmx patches done in time for the 19.0 branch? Also, this "might" have bigger impact than the KNL changes - should we announce the

[clang] f7c96d5 - [Interp] Record::getBase - merge isRecordType/getAs() checks. NFC.

2024-06-19 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-06-19T16:55:33+01:00 New Revision: f7c96d5733915c4ea30dbd7852faffc9cef4aca9 URL: https://github.com/llvm/llvm-project/commit/f7c96d5733915c4ea30dbd7852faffc9cef4aca9 DIFF: https://github.com/llvm/llvm-project/commit/f7c96d5733915c4ea30dbd7852faffc9cef4aca9.diff

[clang] [X86] Enable constexpr on LZCNT & BMI intrinsics (PR #94161)

2024-06-12 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @aniplcc if the x86 builtins handling is causing a problem - could we split this so the generic c code intrinsics (andn, blsr etc.) are done first? https://github.com/llvm/llvm-project/pull/94161 ___ cfe-commits mailing list

[clang] [clang] Split up `SemaDeclAttr.cpp` (PR #93966)

2024-05-31 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Would it make sense to add a new header (SemaUtils.h? SemaTargetUtils.h?) to move most of the exposed templated helpers to instead of Sema.h? https://github.com/llvm/llvm-project/pull/93966 ___ cfe-commits mailing list

[clang] [X86] Add support for MS inp functions. (PR #93804)

2024-05-31 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Maybe add this to ReleaseNotes? https://github.com/llvm/llvm-project/pull/93804 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [X86]Add support for _outp{|w|d} (PR #93774)

2024-05-31 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: Maybe add a line to ReleaseNotes? But otherwise SGTM https://github.com/llvm/llvm-project/pull/93774 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [X86] Support EGPR for inline assembly. (PR #92338)

2024-05-30 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @FreddyLeaf This is corrupting git checkouts on windows - please can you revert ? https://github.com/llvm/llvm-project/pull/92338 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [X86]Add support for _outp{|w|d} (PR #93774)

2024-05-30 Thread Simon Pilgrim via cfe-commits
@@ -63,6 +63,91 @@ unsigned __int64 test__emulu(unsigned int a, unsigned int b) { // CHECK: [[RES:%[0-9]+]] = mul nuw i64 [[Y]], [[X]] // CHECK: ret i64 [[RES]] +// +// CHECK-I386-LABEL: define dso_local noundef i32 @test_outp( +// CHECK-I386-SAME: i16 noundef zeroext

[clang] f3fb7f5 - [X86] x86-atomic-float.c - cleanup unused check prefixes

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:02+01:00 New Revision: f3fb7f569936db418feef98e4ae68777a9a4cd2a URL: https://github.com/llvm/llvm-project/commit/f3fb7f569936db418feef98e4ae68777a9a4cd2a DIFF: https://github.com/llvm/llvm-project/commit/f3fb7f569936db418feef98e4ae68777a9a4cd2a.diff

[clang] 9c42ed1 - [X86] Add x86-atomic-double.c double test coverage

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:03+01:00 New Revision: 9c42ed1371ee8c211aedcfe8aed16662a9befb69 URL: https://github.com/llvm/llvm-project/commit/9c42ed1371ee8c211aedcfe8aed16662a9befb69 DIFF: https://github.com/llvm/llvm-project/commit/9c42ed1371ee8c211aedcfe8aed16662a9befb69.diff

[clang] 4bb6974 - [X86] x86-atomic-long_double.c - cleanup check prefixes

2024-05-29 Thread Simon Pilgrim via cfe-commits
Author: Simon Pilgrim Date: 2024-05-29T10:38:03+01:00 New Revision: 4bb6974a87e495f19faea4b13475a65e842473f0 URL: https://github.com/llvm/llvm-project/commit/4bb6974a87e495f19faea4b13475a65e842473f0 DIFF: https://github.com/llvm/llvm-project/commit/4bb6974a87e495f19faea4b13475a65e842473f0.diff

[clang] [llvm] Reland "[X86] Remove knl/knm specific ISAs supports (#92883)" (PR #93136)

2024-05-23 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: Not sure - CI checks aren't running either https://github.com/llvm/llvm-project/pull/93136 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Introduce `SemaX86` (PR #93098)

2024-05-23 Thread Simon Pilgrim via cfe-commits
RKSimon wrote: @endilll Thanks for working on this - out of interest are you intending to do this for CGBuiltin as well? Is the plan to no longer have to include all target builtins in all clang builds? https://github.com/llvm/llvm-project/pull/93098

[clang] [llvm] [polly] [X86] Remove knl/knm specific ISAs supports (PR #92883)

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

[clang] [llvm] [polly] [X86] Remove knl/knm specific ISAs supports (PR #92883)

2024-05-22 Thread Simon Pilgrim via cfe-commits
@@ -139,6 +139,9 @@ Changes to the Windows Target Changes to the X86 Backend -- +- Removed knl/knm specific ISA lowerings: AVX512PF, AVX512ER, PREFETCHWT1, RKSimon wrote: "ISA intrinsics" instead?

[clang] [llvm] [polly] [X86] Remove knl/knm specific ISAs supports (PR #92883)

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

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon commented: constexpr handling? https://github.com/llvm/llvm-project/pull/91306 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
@@ -232,225 +232,225 @@ typedef char __v2qi __attribute__((__vector_size__(2))); static __inline__ __m256i __DEFAULT_FN_ATTRS256 _mm256_mask_add_epi32(__m256i __W, __mmask8 __U, __m256i __A, __m256i __B) { - return (__m256i)__builtin_ia32_selectd_256((__mmask8)__U, -

[clang] [Clang] Add __builtin_selectvector and use it for AVX512 intrinsics (PR #91306)

2024-05-16 Thread Simon Pilgrim via cfe-commits
@@ -3019,6 +3019,26 @@ C-style cast applied to each element of the first argument. Query for this feature with ``__has_builtin(__builtin_convertvector)``. +``__builtin_selectvector`` +-- + +``__builtin_selectvector`` is used to express generic vector

[clang] Avoid unevaluated implicit private (PR #92055)

2024-05-14 Thread Simon Pilgrim via cfe-commits
https://github.com/RKSimon updated https://github.com/llvm/llvm-project/pull/92055 >From 6946c9f1285d5a27eafcdbf13f79c0641736198d Mon Sep 17 00:00:00 2001 From: Sunil Kuravinakop Date: Thu, 9 May 2024 12:09:15 -0500 Subject: [PATCH 1/3] Avoiding DeclRefExpr with "non_odr_use_unevaluated" to

[clang] [clang-tools-extra] [flang] [llvm] [mlir] [polly] [test]: fix filecheck annotation typos (PR #91854)

2024-05-13 Thread Simon Pilgrim via cfe-commits
@@ -285,7 +285,7 @@ define i32 @xunp(ptr %p) nounwind readnone { ; BMI264-NEXT:rorxl $7, (%rdi), %eax ; BMI264-NEXT:retq entry: -; shld-label: xunp: +; shld-LABEL: xunp: ; shld: shldl $25 RKSimon wrote: remove these 2 checks (the auto checks above

[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

[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] [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-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] [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] [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] [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
@@ -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]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
@@ -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] 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][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-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] 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] [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] [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] 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][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] 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][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] 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] 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] 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] 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-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] [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] [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] 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] 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] [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] 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] [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] [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] [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] [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] [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,

  1   2   3   4   5   6   7   8   9   10   >