[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
MatzeB wrote: I checked that: - scan-build tests run fine by default on my machine. - scan-build tests are skipped when using `cmake -DCMAKE_DISBALE_FIND_PACKAGE_Perl=ON ...`. https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing lis

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/2] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/3] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/4] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
@@ -1,4 +1,4 @@ -REQUIRES: shell +REQUIRES: perl MatzeB wrote: Seems there is `rm` but no `ls`: https://github.com/MatzeB/llvm-project/blob/5e5b18a31057f0d086ce9731d2b58aa70d55eef5/llvm/utils/lit/lit/TestRunner.py?plain=1#L714 https://github.com/llvm/llvm-proj

[clang] Use cmake to find perl executable (PR #91275)

2024-05-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/5] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/6] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/6] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/91275 >From c0b7ec2e336476b1a1d6cf05d07bfde2f3dc88a4 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Mon, 6 May 2024 14:39:37 -0700 Subject: [PATCH 1/7] Use cmake to find perl executable --- clang/CMakeLists.txt

[clang] Use cmake to find perl executable (PR #91275)

2024-05-07 Thread Matthias Braun via cfe-commits
MatzeB wrote: Explicitly disabling the `scan-build` tests on windows now. I think they weren't previously running there because of `REQUIRES: shell` anyway and as far as I can tell from the buildkite results it seems the `scan-build` does not work correctly on windows at the moment. https://g

[clang] Use cmake to find perl executable (PR #91275)

2024-05-08 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/91275 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-21 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/113212 As shufflevector is effectively commutative we should apply the same logic as other commutative operations where we order the inputs by their `getComplexity()` value. This will put things like `undef`, `poison` an

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-28 Thread Matthias Braun via cfe-commits
MatzeB wrote: > I have always expected shuffles to be canonicalized to make the lowest mask > lane the first operand. I believe the AArch64 and Arm matching functions rely > on that at the moment. https://godbolt.org/z/1rr1E8v1K Thanks for pointing this out! So definitely cannot land the chang

[clang] Remove optimization flags from clang codegen tests (PR #113714)

2024-10-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/113714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: > This idea here makes sense, I guess, but I'm a little worried about > unexpected side-effects... not sure how reliably the backend handles commuted > masks, and I don't think we have any testing infrastructure that would catch > that sort of issue. Was wondering about this too

[clang] Remove optimization flags from clang codegen tests (PR #113714)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: Update clang tests separately as suggested in #113212 https://github.com/llvm/llvm-project/pull/113714 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
@@ -1,7 +1,7 @@ +// NOTE: Assertions have been autogenerated by utils/update_cc_test_checks.py UTC_ARGS: --version 5 // REQUIRES: x86-registered-target -// RUN: %clang_cc1 -ffreestanding %s -O3 -triple=x86_64-apple-darwin -target-feature +avx -emit-llvm -o - | FileCheck %s --ch

[clang] [llvm] InstCombine: Order shufflevector operands by complexity (PR #113212)

2024-10-25 Thread Matthias Braun via cfe-commits
MatzeB wrote: > Please push the revised clang tests as a separate patch. Submitted #113714 for the test updates (still included here for "stacking") https://github.com/llvm/llvm-project/pull/113212 ___ cfe-commits mailing list cfe-commits@lists.llvm.o

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
MatzeB wrote: Note that this has the test changes from #117091 included. https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117092 - Rework attr-target-x86 test - Allow prefer-256-bit for __attribute__((target)) >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -080

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB created https://github.com/llvm/llvm-project/pull/117091 Rework the attr-target-x86 test so the CHECK lines for the attributes are next to their corresponding `__attribute__`. >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun

[clang] Rework attr-target-x86 test (PR #117091)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB ready_for_review https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-11-20 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/117092 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Rework attr-target-x86 test (PR #117091)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/117091 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] allow prefer 256 bit attribute target (PR #117092)

2024-12-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/117092 >From 3bab9f901045426321d687fc36e4ba3034cc0f30 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Wed, 20 Nov 2024 17:23:56 -0800 Subject: [PATCH 1/2] Rework attr-target-x86 test Rework the attr-target-x86 test

[clang] Check for unsupported target options even with -Qunused-arguments (PR #141698)

2025-05-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/141698 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Check for unsupported target options even with -Qunused-arguments (PR #141698)

2025-05-28 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/141698 >From cef4f070167474ac0e8d1eea903974a31ff9934d Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Tue, 27 May 2025 18:20:28 -0700 Subject: [PATCH 1/2] Check for unsupported target options even with -Qunused-arg

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-16 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB closed https://github.com/llvm/llvm-project/pull/142236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
@@ -60,7 +60,7 @@ uint64_t AArch64::getFMVPriority(ArrayRef Features) { ExtensionSet FeatureBits; for (const StringRef Feature : Features) { std::optional FMV = parseFMVExtension(Feature); -if (!FMV) { +if (!FMV && Feature.starts_with('+')) { M

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
@@ -1831,6 +1831,22 @@ TEST_P(AArch64ExtensionDependenciesBaseCPUTestFixture, } } +TEST(TargetParserTest, testAArch64ReconstructFromParsedFeatures) { + AArch64::ExtensionSet Extensions; + std::vector FeatureOptions = { + "-sve2", "-Baz", "+sve", "+FooBar", "+sve2", "+

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-05 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/142236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/142236 >From 92da4def0f7c39a6348669387cfc874ee03f8471 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 30 May 2025 16:19:16 -0700 Subject: [PATCH 1/2] [AArch64TargetParser]Fix reconstructFromParsedFeatures igno

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-03 Thread Matthias Braun via cfe-commits
MatzeB wrote: Cannot test with `--print-enabled-extensions` as clang has its own logic to parse target features. But I added a test based on the `always_inline` compatibility check logic that is close to the original issue we ran into. https://github.com/llvm/llvm-project/pull/142236

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-03 Thread Matthias Braun via cfe-commits
@@ -1831,6 +1831,22 @@ TEST_P(AArch64ExtensionDependenciesBaseCPUTestFixture, } } +TEST(TargetParserTest, testAArch64ReconstructFromParsedFeatures) { MatzeB wrote: typo in the test is fixed now. https://github.com/llvm/llvm-project/pull/142236

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-03 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB updated https://github.com/llvm/llvm-project/pull/142236 >From 92da4def0f7c39a6348669387cfc874ee03f8471 Mon Sep 17 00:00:00 2001 From: Matthias Braun Date: Fri, 30 May 2025 16:19:16 -0700 Subject: [PATCH 1/3] [AArch64TargetParser]Fix reconstructFromParsedFeatures igno

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-06 Thread Matthias Braun via cfe-commits
@@ -0,0 +1,8 @@ +// RUN: %clang_cc1 -triple aarch64-- -target-feature +neon -target-feature +sve\ +// RUN: -target-feature -sve -emit-llvm %s -o - | FileCheck %s + +// Reproducer for bug where clang would reject always_inline for unrelated +// target features if they were disab

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-06 Thread Matthias Braun via cfe-commits
MatzeB wrote: I submitted this fix after seeing this line: https://github.com/llvm/llvm-project/blob/main/llvm/lib/TargetParser/AArch64TargetParser.cpp#L368 which looks like the function intends to handle negative features. https://github.com/llvm/llvm-project/pull/142236 ___

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-06 Thread Matthias Braun via cfe-commits
@@ -1831,6 +1831,22 @@ TEST_P(AArch64ExtensionDependenciesBaseCPUTestFixture, } } +TEST(TargetParserTest, testAArch64ReconstructFromParsedFeatures) { + AArch64::ExtensionSet Extensions; + std::vector FeatureOptions = { + "-sve2", "-Baz", "+sve", "+FooBar", "+sve2", "+

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-06 Thread Matthias Braun via cfe-commits
MatzeB wrote: The original situation looks something like: ``` #include void foo() { // ... uint8x16_t x = {}; vreinterpretq_u8_s8(x); } ``` Compiled with `clang -target aarch64-redhat-linux-gnu -march=-march=armv9-a+sve2+fp16+fp16fml+crypto+bf16+sm4+i8mm+sve2-bitperm+sve2-sha3+sve2

[clang] [llvm] [AArch64TargetParser]Fix reconstructFromParsedFeatures ignoring negative features (PR #142236)

2025-06-06 Thread Matthias Braun via cfe-commits
https://github.com/MatzeB edited https://github.com/llvm/llvm-project/pull/142236 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [Clang] Do not treat Foo -> const Foo conversion sequences as perfect (PR #148613)

2025-07-16 Thread Matthias Braun via cfe-commits
MatzeB wrote: FYI: This change breaks common thrift-generated code. Reduced example here shows the problem and produces "expression is not assignable" (but is accepted by all released gcc and clang versions as far as I can tell). No idea if the code is valid/invalid: ``` #include struct TmsEx

<    1   2