[clang] [clang][LoongArch] Don't imply -fdirect-access-external-data for non-PIC (PR #71887)

2023-11-09 Thread Xi Ruoyao via cfe-commits
xry111 wrote: Suggest to add "Fixes #71645" in the message. https://github.com/llvm/llvm-project/pull/71887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Don't imply -fdirect-access-external-data for non-PIC (PR #71887)

2023-11-09 Thread Xi Ruoyao via cfe-commits
xry111 wrote: cc @MaskRay https://github.com/llvm/llvm-project/pull/71887 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > Do folks feel like the attribute name is sufficiently descriptive? i.e. > should it be `__attribute__((code_model("asdf")))`? Are we aiming for GCC > compat here? What guides the naming choice? Yes, for GCC compat, so we don't need to add more #ifdef's in kernel. As the author

[clang] [clang] Add per-global code model attribute (PR #72078)

2023-12-05 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > is it too late to change the gcc attribute name? It has been released in GCC 13, and GCC 14 is in stage 3 so a change must be deferred into GCC 15. And the kernel code already relies on it. So a change will render all previous kernel releases impossible to build with GCC 13/1

[clang] [Driver] Support -mcmodel= for LoongArch (PR #72514)

2023-11-16 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > And AFAIK, gcc side doesn't plan to implement the "large" code model. Why did we distinguish "large" and "extreme" in the first place? If we don't need a different "large" code model then I guess we should make it an alias of "extreme" for GCC too. https://github.com/llvm/llv

[clang] [LoongArch] Fix ABI mismatch with gcc/g++ about empty structs passing (PR #70320)

2023-10-30 Thread Xi Ruoyao via cfe-commits
xry111 wrote: LGTM. I've no permission to make a formal ("GitHub style") approval. https://github.com/llvm/llvm-project/pull/70320 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][LoongArch] Enable -fasynchronous-unwind-tables by default on Linux (PR #94711)

2024-06-06 Thread Xi Ruoyao via cfe-commits
xry111 wrote: I'm really not a fan of enabling frame pointer by default. And enabling -fasynchronous-unwind-table is at least consistent with GCC. https://github.com/llvm/llvm-project/pull/94711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-11-04 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114514 >From bfd9e855bc1c91bee6c39e388f20be48db8dfd8f Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:28:12 +0800 Subject: [PATCH] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-03 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114513 >From 0d62818ddfa1d6b99afca4653a9f47478f301b32 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:22:09 +0800 Subject: [PATCH] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114512 >From ef96a6e483030e649d69ffa778c0b0f229bbb739 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:13:29 +0800 Subject: [PATCH 1/2] [LoongArch][Clang] Make the parameter and return value of {x,}vms

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-02 Thread Xi Ruoyao via cfe-commits
xry111 wrote: > Is it the time to remove the FIXME in those tests? There are several random inconsistencies and I separated the fixes into multiple PRs as suggested by Xuerui. The FIXME is removed in #114513. https://github.com/llvm/llvm-project/pull/114511 ___

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114514 >From 3d65a59473580f1c0e0b57bdd7fb13c9f40d3077 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:07:17 +0800 Subject: [PATCH 1/5] [LoongArch][clang] Use `signed char` vectors instead of `char` ve

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114512 >From 3d65a59473580f1c0e0b57bdd7fb13c9f40d3077 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:07:17 +0800 Subject: [PATCH 1/3] [LoongArch][clang] Use `signed char` vectors instead of `char` ve

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114511 >From 3d65a59473580f1c0e0b57bdd7fb13c9f40d3077 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:07:17 +0800 Subject: [PATCH 1/2] [LoongArch][clang] Use `signed char` vectors instead of `char` ve

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (PR #114510)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114510 >From 3d65a59473580f1c0e0b57bdd7fb13c9f40d3077 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:07:17 +0800 Subject: [PATCH] [LoongArch][clang] Use `signed char` vectors instead of `char` vector

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114511 >From ef96a6e483030e649d69ffa778c0b0f229bbb739 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:13:29 +0800 Subject: [PATCH] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114513 >From 3d65a59473580f1c0e0b57bdd7fb13c9f40d3077 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:07:17 +0800 Subject: [PATCH 1/4] [LoongArch][clang] Use `signed char` vectors instead of `char` ve

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114514 >From ef96a6e483030e649d69ffa778c0b0f229bbb739 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:13:29 +0800 Subject: [PATCH 1/4] [LoongArch][Clang] Make the parameter and return value of {x,}vms

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114513 >From ef96a6e483030e649d69ffa778c0b0f229bbb739 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:13:29 +0800 Subject: [PATCH 1/3] [LoongArch][Clang] Make the parameter and return value of {x,}vms

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114514 >From c1b7b79e7027ad7fed410c1783113228173843f1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:17:44 +0800 Subject: [PATCH 1/3] [LoongArch][Clang] Make the parameters and return value of {x,}vs

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114513 >From c1b7b79e7027ad7fed410c1783113228173843f1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:17:44 +0800 Subject: [PATCH 1/2] [LoongArch][Clang] Make the parameters and return value of {x,}vs

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-11-02 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114512 >From c1b7b79e7027ad7fed410c1783113228173843f1 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:17:44 +0800 Subject: [PATCH] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for L SX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114510 `-flax-vector-conversions=none` does not allow an implicit conversion from `signed char` vector to `char` vector, and we cannot remove `signed` from `v16i8` or `v32i8` because doing so will break our expectation w

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114513 The lsxintrin.h and and lasxintrin.h headers uses `unsigned char` vectors instead of `signed char` vectors. GCC also uses `unsigned char` for them, so align their definition with the headers and GCC. Fixes #

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (PR #114510)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 edited https://github.com/llvm/llvm-project/pull/114510 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114509 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/lasx

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-11-01 Thread Xi Ruoyao via cfe-commits
@@ -0,0 +1,6 @@ +// REQUIRES: loongarch-registered-target xry111 wrote: Dropped. https://github.com/llvm/llvm-project/pull/114509 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/m

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-11-01 Thread Xi Ruoyao via cfe-commits
@@ -0,0 +1,6 @@ +// REQUIRES: loongarch-registered-target +// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lasx xry111 wrote: Done. https://github.com/llvm/llvm-project/pull/114509 ___ c

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-11-01 Thread Xi Ruoyao via cfe-commits
@@ -0,0 +1,6 @@ +// REQUIRES: loongarch-registered-target +// RUN: %clang_cc1 %s -fsyntax-only -triple loongarch64-linux -target-feature +lasx xry111 wrote: -linux dropped. I just mistakenly thought a triple had to have the os field. https://github.com/llvm/ll

[clang] [LoongArch][clang] Use `signed char` vectors instead of `char` vectors for LSX and LASX builtins (PR #114510)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114510 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH 1/2] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vxor.v builti ns `unsigned char` vectors (PR #114513)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114513 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH 1/5] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114514 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH 1/6] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114511 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH 1/3] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-11-01 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 updated https://github.com/llvm/llvm-project/pull/114512 >From dd6a7a7d8446281b948c75b10dd40bacbb23daa8 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH 1/4] [LoongArch][Clang] Add tests for #110834 --- clang/test/Headers/

[clang] [LoongArch][Clang] Add tests for #110834 (PR #114509)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114509 None >From 1bbbc1c38715f42e6014ee319d76af9a4015e4d5 Mon Sep 17 00:00:00 2001 From: Xi Ruoyao Date: Fri, 1 Nov 2024 00:00:14 +0800 Subject: [PATCH] [LoongArch][Clang] Add tests for #110834 --- clang/test/Header

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vshuf.b builtins `signed char` vectors (PR #114512)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114512 The lsxintrin.h and and lasxintrin.h headers uses `signed char` vectors instead of `unsigned char` vectors. GCC also uses `signed char` for them, so align their definition with the headers and GCC. Depends on #1

[clang] [LoongArch][Clang] Make the parameter and return value of {x,}vmsknz.b builtins `signed char` vector (PR #114511)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114511 These builtins operate on int8 vectors, not int16 vectors. So the old definition does not make any sense. Depends on #114510. Part of #110834 fix. >From 1bbbc1c38715f42e6014ee319d76af9a4015e4d5 Mon Sep 17 00:0

[clang] [LoongArch][Clang] Make the parameters and return value of {x,}vorn.v builti ns `unsigned char` vectors (PR #114514)

2024-10-31 Thread Xi Ruoyao via cfe-commits
https://github.com/xry111 created https://github.com/llvm/llvm-project/pull/114514 All other bitwise vector builtins use `unsigned char` vector operands, so it does not make too much sense to use `signed char` for the orn operation alone. The same change has been also proposed for GCC: http