[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-25 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus closed https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: I've removed the dummy field and the comment now. This should prevent confusion. I don't know whether anyone actually uses the emitted comment, there is no explanation, and tests pass without it. I suggest that if we later learn that there are valid uses that require the

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-23 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/89228 >From 5d4a3b0f922b0c28960f610c695c92da7d3538c1 Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 18 Apr 2024 14:56:47 +0200 Subject: [PATCH 1/2] [clang-format] Remove YAML hack to emit a BasedOnStyle

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName);

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > This doesn't feel correct to me... I'd also be fine with just removing the comment. https://github.com/llvm/llvm-project/pull/89228 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-19 Thread Jannik Silvanus via cfe-commits
@@ -807,12 +807,18 @@ template <> struct MappingTraits { FormatStyle PredefinedStyle; if (getPredefinedStyle(StyleName, Style.Language, ) && Style == PredefinedStyle) { - IO.mapOptional("# BasedOnStyle", StyleName); + // For

[clang] [clang-format] Remove YAML hack to emit a BasedOnStyle comment (PR #89228)

2024-04-18 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus created https://github.com/llvm/llvm-project/pull/89228 When serializing a formatting style to YAML, we were emitting a comment `# BasedOnStyle:

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2024-01-10 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: Interesting, here it is online: https://alive2.llvm.org/ce/z/Bm5gP2 The complaint goes away if `half` is naturally aligned (`f16:16`). Looks like an Alive2 bug with respect to vector bit layout? https://github.com/llvm/llvm-project/pull/75448

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2024-01-04 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus closed https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-19 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: I'm now on vacation for two weeks, returning Jan 4th. I'll merge the PR then (if it is approved by then). https://github.com/llvm/llvm-project/pull/75448 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > Alternative would be to forbid GEP indexing into vectors entirely. I agree that it would be better if there just were no vector GEPs, but that breaks importing older modules, and that cannot be easily auto-upgraded (convert to byte-GEPs?). Even worse, DXIL uses different

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
@@ -111,6 +111,20 @@ define void @test_evaluate_gep_as_ptrs_array(ptr addrspace(2) %B) { ret void } +define void @test_overaligned_vec(i8 %B) { +; This should be turned into a constexpr instead of being an instruction +; CHECK-LABEL: @test_overaligned_vec( +;

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/5] [InstCombine] Precommit test exhibiting miscompile

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
@@ -108,7 +143,23 @@ class generic_gep_type_iterator { // that. bool isStruct() const { return isa(CurTy); } - bool isSequential() const { return isa(CurTy); } + bool isVector() const { return isa(CurTy); } + bool isSequential() const { return !isStruct(); } + + //

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/4] [InstCombine] Precommit test exhibiting miscompile

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > There seem to be some clang test failures though that I'm currently looking > into. Solved: The clang failures were caused by me having `dxv` in `$PATH`, which implicitly enabled some extra `dxv`-based tests which also fail without this patch for me. Clang was invoking

[llvm] [clang] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
jasilvanus wrote: > Can this solve #68566 too? I don't think it solves it, as it only fixes offset computations within GEPs and doesn't teach code in general about the correct vector layout. However, it is reducing the amount of code assuming the wrong layout. There seem to be some clang

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/3] [InstCombine] Precommit test exhibiting miscompile

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus updated https://github.com/llvm/llvm-project/pull/75448 >From 2c367fba42b716d803ee088af45c1b57fe4bcbcd Mon Sep 17 00:00:00 2001 From: Jannik Silvanus Date: Thu, 14 Dec 2023 09:24:51 +0100 Subject: [PATCH 1/3] [InstCombine] Precommit test exhibiting miscompile

[clang] [llvm] [IR] Fix GEP offset computations for vector GEPs (PR #75448)

2023-12-14 Thread Jannik Silvanus via cfe-commits
https://github.com/jasilvanus created https://github.com/llvm/llvm-project/pull/75448 Vectors are always bit-packed and don't respect the elements' alignment requirements. This is different from arrays. This means offsets of vector GEPs need to be computed differently than offsets of array

[clang] 9741ac5 - [clang-format] vim integration: Mention python3 variant of bindings

2023-06-21 Thread Jannik Silvanus via cfe-commits
Author: Jannik Silvanus Date: 2023-06-21T17:18:36+02:00 New Revision: 9741ac5b3b3e7942e3332e37af829e58e5e2bb82 URL: https://github.com/llvm/llvm-project/commit/9741ac5b3b3e7942e3332e37af829e58e5e2bb82 DIFF: