[clang] [libclc] [libcxx] [lld] [llvm] [openmp] llvm encode decode (PR #87187)

2024-04-07 Thread Yingchi Long via cfe-commits
https://github.com/inclyc converted_to_draft https://github.com/llvm/llvm-project/pull/87187 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] [Clang][BPF] Allow sign/zero extension for call parameters with int/uint types (PR #84874)

2024-03-12 Thread Yingchi Long via cfe-commits
https://github.com/inclyc approved this pull request. https://github.com/llvm/llvm-project/pull/84874 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +;

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -31,6 +31,9 @@ def SDT_BPFMEMCPY : SDTypeProfile<0, 4, [SDTCisVT<0, i64>, SDTCisVT<1, i64>, SDTCisVT<2, i64>, SDTCisVT<3,

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,92 @@ +//=== BPFIRPeephole.cpp - IR Peephole Transformation --===// inclyc wrote: nit https://github.com/llvm/llvm-project/pull/84410 ___ cfe-commits mailing list

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -638,6 +643,31 @@ SDValue BPFTargetLowering::LowerDYNAMIC_STACKALLOC(SDValue Op, return DAG.getMergeValues(Ops, SDLoc()); } +SDValue BPFTargetLowering::LowerADDRSPACECAST(SDValue Op, + SelectionDAG ) const { + auto *ACast =

[clang] [llvm] BPF address space insn (PR #84410)

2024-03-08 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,52 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4 +; RUN: opt --bpf-check-and-opt-ir -S -mtriple=bpf-pc-linux < %s | FileCheck %s + +; Generated from the following C code: +; +; extern int __uptr *magic1(); +;

[clang] [clang][NFC] resolve redundant predicates (PR #79701)

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/79701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] resolve redundant predicates (PR #79701)

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc approved this pull request. Looks like an NFC patch https://github.com/llvm/llvm-project/pull/79701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] resolve redundant predicates (PR #79701)

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/79701 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/79672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-28 Thread Yingchi Long via cfe-commits
@@ -2558,6 +2558,14 @@ def : Pat<(rotr GPR32:$Rn, (i64 imm0_31:$imm)), def : Pat<(rotr GPR64:$Rn, (i64 imm0_63:$imm)), (EXTRXrri GPR64:$Rn, GPR64:$Rn, imm0_63:$imm)>; +def SDT_AArch64BFI_32bit : SDTypeProfile<1, 2, [SDTCisVT<0, i32>, SDTCisVT<1, i32>, +

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

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/79672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

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

2024-01-28 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: Also I kindly wonder if this intrinsic is necessary for optimization/codegen. Why not prefer inline assembly? https://github.com/llvm/llvm-project/pull/79672 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[flang] [compiler-rt] [llvm] [clang-tools-extra] [clang] [libcxxabi] [openmp] [mlir] [libcxx] [libc] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-26 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/78632 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[flang] [compiler-rt] [llvm] [clang-tools-extra] [clang] [libcxxabi] [openmp] [mlir] [libcxx] [libc] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-26 Thread Yingchi Long via cfe-commits
@@ -21248,6 +21297,51 @@ static SDValue foldTruncStoreOfExt(SelectionDAG , SDNode *N) { return SDValue(); } +// A custom combine to lower load <3 x i8> as the more efficient sequence +// below: +//ldrb wX, [x0, #2] +//ldrh wY, [x0] +//orr wX, wY, wX, lsl #16

[compiler-rt] [llvm] [libcxx] [clang] [mlir] [openmp] [libcxxabi] [flang] [clang-tools-extra] [libc] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-25 Thread Yingchi Long via cfe-commits
@@ -21248,6 +21297,51 @@ static SDValue foldTruncStoreOfExt(SelectionDAG , SDNode *N) { return SDValue(); } +// A custom combine to lower load <3 x i8> as the more efficient sequence +// below: +//ldrb wX, [x0, #2] +//ldrh wY, [x0] +//orr wX, wY, wX, lsl #16

[compiler-rt] [libc] [libcxxabi] [flang] [libcxx] [clang] [openmp] [mlir] [clang-tools-extra] [llvm] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-22 Thread Yingchi Long via cfe-commits
https://github.com/inclyc approved this pull request. LGTM because I just did similar thing in our (unfortunately, closed source) backend. Let's wait for aarch64 code owners :) ! https://github.com/llvm/llvm-project/pull/78632 ___ cfe-commits mailing

[clang-tools-extra] [libc] [llvm] [clang] [flang] [libcxxabi] [compiler-rt] [mlir] [libcxx] [openmp] [AArch64] Add custom lowering for load <3 x i8>. (PR #78632)

2024-01-22 Thread Yingchi Long via cfe-commits
@@ -21095,6 +21095,50 @@ static SDValue foldTruncStoreOfExt(SelectionDAG , SDNode *N) { return SDValue(); } +// A custom combine to lower load <3 x i8> as the more efficient sequence +// below: +//ldrb wX, [x0, #2] +//ldrh wY, [x0] +//orr wX, wY, wX, lsl #16

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc closed https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc approved this pull request. https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s inclyc wrote: PS. for cxx attribute you may create a new file. https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s inclyc wrote: I just noticed that we already have test file at `clang/test/Sema/no_stack_protector.c`, may be just update that file. > No other single attribute has its dedicated test file

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc edited https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,4 @@ +// RUN: %clang_cc1 -fsyntax-only -verify -std=c23 %s inclyc wrote: the file name `gnu-attributes.c` is too "generic", perhaps better place these files under `clang/test/Sema/attr-no-stack-protector.c` and

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc approved this pull request. https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Parse attribute [[gnu::no_stack_protector]] (PR #75289)

2023-12-13 Thread Yingchi Long via cfe-commits
https://github.com/inclyc requested changes to this pull request. The PR contains functional change so please add test & assertions under `clang/test` https://github.com/llvm/llvm-project/pull/75289 ___ cfe-commits mailing list

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-11 Thread Yingchi Long via cfe-commits
inclyc wrote: > I have build scripts and patches at: https://github.com/xu-chiheng/Note > […](#) > On Mon, Dec 11, 2023 at 11:25 PM Yingchi Long ***@***.***> wrote: When > bootstrapping Clang on Cygwin, there are various weird problems. What are > those "weired problems" Reducing the size of

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-11 Thread Yingchi Long via cfe-commits
inclyc wrote: > When bootstrapping Clang on Cygwin, there are various weird problems. What are those "weired problems" > Reducing the size of CallArgList solve them all. And why reduce the size of `CallArgList` solve them all? Could you kindly elaborate?

[clang] [Cygwin] Reduced number of inline elements of CallArgList. (PR #74977)

2023-12-10 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: > This fix bootstraping on Cygwin, using GCC 13.2.0 as stage 0 compiler. It seems that the size of CallArgList can't exceed an unknown limit. How about paste some logs here? This change seems to be completely NFC, and I suppose it shall work for GCC 13?

[clang] [Cygwin] Cygwin macro (PR #74973)

2023-12-10 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: Would you please add some tests about your changes? Also maybe it will be more useful to write some detailed descriptions, so others can understand your code easily. Cheers! https://github.com/llvm/llvm-project/pull/74973

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
https://github.com/inclyc commented: Also please add release notes to let users know what has been changed :) See: `clang/docs/ReleaseNotes.rst` https://github.com/llvm/llvm-project/pull/74440 ___ cfe-commits mailing list cfe-commits@lists.llvm.org

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -918,6 +918,9 @@ def Wdeprecated : Flag<["-"], "Wdeprecated">, Group, HelpText<"Enable warnings for deprecated constructs and define __DEPRECATED">; def Wno_deprecated : Flag<["-"], "Wno-deprecated">, Group, Visibility<[ClangOption, CC1Option]>; +def

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -0,0 +1,107 @@ +// RUN: %clang_cc1 -std=c11 -fsyntax-only -verify -Wformat -Wformat-signedness %s + +int printf(const char *restrict format, ...); +int scanf(const char * restrict, ...); + +void test_printf_bool(_Bool x) +{ +printf("%d", x); // no-warning +

[clang] [llvm] [Sema] Implement support for -Wformat-signedness (PR #74440)

2023-12-05 Thread Yingchi Long via cfe-commits
@@ -11815,6 +11815,18 @@ isArithmeticArgumentPromotion(Sema , const ImplicitCastExpr *ICE) { S.Context.getFloatingTypeOrder(From, To) < 0; } +static clang::analyze_format_string::ArgType::MatchKind inclyc wrote: ```suggestion static

[clang] 596f76a - Revert "[C2x] reject type definitions in offsetof"

2023-01-16 Thread Yingchi Long via cfe-commits
Author: Yingchi Long Date: 2023-01-16T16:52:50+08:00 New Revision: 596f76a799c933927eec4d8ac8a83c44efff9854 URL: https://github.com/llvm/llvm-project/commit/596f76a799c933927eec4d8ac8a83c44efff9854 DIFF: https://github.com/llvm/llvm-project/commit/596f76a799c933927eec4d8ac8a83c44efff9854.diff

[clang] e327b52 - [C2x] reject type definitions in offsetof

2023-01-12 Thread Yingchi Long via cfe-commits
Author: Yingchi Long Date: 2023-01-13T15:33:26+08:00 New Revision: e327b52766ed497e4779f4e652b9ad237dfda8e6 URL: https://github.com/llvm/llvm-project/commit/e327b52766ed497e4779f4e652b9ad237dfda8e6 DIFF: https://github.com/llvm/llvm-project/commit/e327b52766ed497e4779f4e652b9ad237dfda8e6.diff

[clang] 2ec79af - [Sema] check InitListExpr format strings like {"foo"}

2022-11-22 Thread Yingchi Long via cfe-commits
Author: Yingchi Long Date: 2022-11-23T04:58:19+08:00 New Revision: 2ec79afd89932f0d5a9c44050e7b6dc08ff51699 URL: https://github.com/llvm/llvm-project/commit/2ec79afd89932f0d5a9c44050e7b6dc08ff51699 DIFF: https://github.com/llvm/llvm-project/commit/2ec79afd89932f0d5a9c44050e7b6dc08ff51699.diff

[clang] 0e40a78 - [clang][NFC] sync comments from declaration of InitializePreprocessor

2022-10-29 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-10-29T14:23:03+08:00 New Revision: 0e40a78319232ff22dcc54dcb92bfef8495325f1 URL: https://github.com/llvm/llvm-project/commit/0e40a78319232ff22dcc54dcb92bfef8495325f1 DIFF: https://github.com/llvm/llvm-project/commit/0e40a78319232ff22dcc54dcb92bfef8495325f1.diff

[clang] 94e8bd0 - [clang] Fix crash upon stray coloncolon token in C2x mode

2022-10-18 Thread YingChi Long via cfe-commits
Author: Jialun Hu Date: 2022-10-18T21:57:32+08:00 New Revision: 94e8bd002c81ace308ddac9b66385ef932655fd3 URL: https://github.com/llvm/llvm-project/commit/94e8bd002c81ace308ddac9b66385ef932655fd3 DIFF: https://github.com/llvm/llvm-project/commit/94e8bd002c81ace308ddac9b66385ef932655fd3.diff

[clang] 5ee51e8 - [clang] trim trailing space in format tests. NFC

2022-08-31 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-09-01T13:30:40+08:00 New Revision: 5ee51e8154253088b333c8e82c64d0f00d7d0524 URL: https://github.com/llvm/llvm-project/commit/5ee51e8154253088b333c8e82c64d0f00d7d0524 DIFF: https://github.com/llvm/llvm-project/commit/5ee51e8154253088b333c8e82c64d0f00d7d0524.diff

[clang] e3bd67e - [clang][Sema] check default argument promotions for printf

2022-08-31 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-09-01T10:10:10+08:00 New Revision: e3bd67eddf65b20956513e91715b1f997dae2690 URL: https://github.com/llvm/llvm-project/commit/e3bd67eddf65b20956513e91715b1f997dae2690 DIFF: https://github.com/llvm/llvm-project/commit/e3bd67eddf65b20956513e91715b1f997dae2690.diff

[clang] ccbc22c - [Sema] fix false -Wcomma being emitted from void returning functions

2022-08-16 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-16T20:44:38+08:00 New Revision: ccbc22cd8976c285d76e9f66dd5cac2fe908d084 URL: https://github.com/llvm/llvm-project/commit/ccbc22cd8976c285d76e9f66dd5cac2fe908d084 DIFF: https://github.com/llvm/llvm-project/commit/ccbc22cd8976c285d76e9f66dd5cac2fe908d084.diff

[clang] e582519 - [clang] fix frontend crash when evaluating type trait

2022-08-12 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-13T00:02:19+08:00 New Revision: e5825190b8ad7ac8fe762fe4101cd4af04f4c057 URL: https://github.com/llvm/llvm-project/commit/e5825190b8ad7ac8fe762fe4101cd4af04f4c057 DIFF: https://github.com/llvm/llvm-project/commit/e5825190b8ad7ac8fe762fe4101cd4af04f4c057.diff

[clang] 55d3b79 - [clang] add APValue type check in `TryPrintAsStringLiteral`

2022-08-09 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-10T08:42:59+08:00 New Revision: 55d3b79d159bab53b140860279486db8a1c0e4f3 URL: https://github.com/llvm/llvm-project/commit/55d3b79d159bab53b140860279486db8a1c0e4f3 DIFF: https://github.com/llvm/llvm-project/commit/55d3b79d159bab53b140860279486db8a1c0e4f3.diff

[clang] 87dc7d4 - [clang][CodeGen] Factor out Swift ABI hooks (NFCI)

2022-08-07 Thread YingChi Long via cfe-commits
Author: Sergei Barannikov Date: 2022-08-08T00:23:23+08:00 New Revision: 87dc7d4b619d9823b4d5d33bbc3ff3a193b9da2f URL: https://github.com/llvm/llvm-project/commit/87dc7d4b619d9823b4d5d33bbc3ff3a193b9da2f DIFF:

[clang] 1f54006 - [clang][docs] use `Fixes` instead of `This fixes` in ReleaseNotes [NFC]

2022-08-06 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-07T12:42:15+08:00 New Revision: 1f54006bcacf3967b03f9851edf7f9cd773d53e8 URL: https://github.com/llvm/llvm-project/commit/1f54006bcacf3967b03f9851edf7f9cd773d53e8 DIFF: https://github.com/llvm/llvm-project/commit/1f54006bcacf3967b03f9851edf7f9cd773d53e8.diff

[clang] a6cb841 - clang: fix typo availbility

2022-08-06 Thread YingChi Long via cfe-commits
Author: Aarush Bhat Date: 2022-08-07T03:44:55+08:00 New Revision: a6cb8419b1757380e3c577477fdc2501484a7245 URL: https://github.com/llvm/llvm-project/commit/a6cb8419b1757380e3c577477fdc2501484a7245 DIFF: https://github.com/llvm/llvm-project/commit/a6cb8419b1757380e3c577477fdc2501484a7245.diff

[clang] 282d475 - [clang] change `auto` to `Expr` in last commit [NFC]

2022-08-04 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-04T21:15:45+08:00 New Revision: 282d4755c37ced7c2b36526d79033c5c76a006a8 URL: https://github.com/llvm/llvm-project/commit/282d4755c37ced7c2b36526d79033c5c76a006a8 DIFF: https://github.com/llvm/llvm-project/commit/282d4755c37ced7c2b36526d79033c5c76a006a8.diff

[clang] f417583 - [clang] format string checking for conpile-time evaluated str literal

2022-08-04 Thread YingChi Long via cfe-commits
Author: YingChi Long Date: 2022-08-04T21:07:30+08:00 New Revision: f417583f319bd60d1e32cdf9d0242e42f86101bf URL: https://github.com/llvm/llvm-project/commit/f417583f319bd60d1e32cdf9d0242e42f86101bf DIFF: https://github.com/llvm/llvm-project/commit/f417583f319bd60d1e32cdf9d0242e42f86101bf.diff