[clang] [Clang][AArch64] Fix typo with colon-separated syntax for system registers (PR #105608)

2025-03-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/105608 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #130761)

2025-03-11 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/130761 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #129885)

2025-03-11 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: Thanks for the report :+1: It looks like all we have to do is set the legalization rule for f32 to "Promote". Looks like there's actually already logic to do this for a bunch of other nodes: >From X86ISelLowering.cpp: ```c++ // On 32 bit MSVC, `fmodf(f32)` is not defined - only

[clang] Reland "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #129885)

2025-03-05 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/129885 Reverts llvm/llvm-project#127987 Original description: This updates the existing modf[f|l] builtin to be lowered via the llvm.modf.* intrinsic (rather than directly to a library call). The legalization issues e

[clang] [clang][docs] Fix typo in AttrDocs.td (NFC) (PR #127183)

2025-02-14 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/127183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Fix typo in AttrDocs.td (NFC) (PR #127183)

2025-02-14 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. LGTM, thanks! https://github.com/llvm/llvm-project/pull/127183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang][docs] Fix typo in AttrDocs.td (NFC) (PR #127183)

2025-02-14 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/127183 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/126750 >From eee5bc815c4b6b7e5a18503959b2a2354d73058b Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Tue, 11 Feb 2025 15:32:23 + Subject: [PATCH 1/4] [clang] Lower modf builtin using `llvm.modf` intrinsic Th

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > So to handle this, we need different lowering in strictfp mode, probably to a > "constrained" intrinsic. I've updated the lowering to simply bail out when `Builder.getIsFPConstrained()` set (which I think corresponds to `strictfp`). So now in the `HAS_MAYTRAP` case the lowerin

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
@@ -4096,6 +4114,15 @@ RValue CodeGenFunction::EmitBuiltinExpr(const GlobalDecl GD, unsigned BuiltinID, case Builtin::BI__builtin_frexpf128: case Builtin::BI__builtin_frexpf16: return RValue::get(emitFrexpBuiltin(*this, E, Intrinsic::frexp)); + case Builtin::BImodf: +

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue edited https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/127065 >From f98f80df7b93722581c04d181eea4273d4f1 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Thu, 13 Feb 2025 14:23:33 + Subject: [PATCH 1/2] [clang] Add `__builtin_sincospi` that lowers to `llvm.sin

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/126750 >From eee5bc815c4b6b7e5a18503959b2a2354d73058b Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Tue, 11 Feb 2025 15:32:23 + Subject: [PATCH 1/5] [clang] Lower modf builtin using `llvm.modf` intrinsic Th

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-17 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: I've disabled the intrinsic lowering for both `sincos`/`sincospi` when strictfp is enabled (and added a test for that). I think I might need to cherry-pick the `sincos` fix onto the release 20.x branch too. https://github.com/llvm/llvm-project/pull/127065 __

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-19 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > From this patch? https://lab.llvm.org/buildbot/#/builders/72/builds/8380 > > FYI @fmayer Looks like it, I had missed it in the log but the actual error is: > ExpandFloatResult #0: t57: ppcf128,ppcf128 = fmodf > ConstantFP:ppcf128, > llvm-project/compiler-rt/lib/msan/tests/msan

[clang] [clang] Lower modf builtin using `llvm.modf` intrinsic (PR #126750)

2025-02-19 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: I think this patch should fix the issue: https://github.com/llvm/llvm-project/pull/127895 https://github.com/llvm/llvm-project/pull/126750 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/lis

[clang] [llvm] [AArch64][SVE] Lower unpredicated loads/stores as LDR/STR. (PR #127837)

2025-02-21 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: I think with the `AllowMisalignedMemAccesses` check (preventing this applying when `+strict-align` is set) this _probably_ okay. The `LDR ZPR` notes: > The load is performed as contiguous byte accesses, with no endian conversion > and no guarantee of single-copy atomicity larger

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue updated https://github.com/llvm/llvm-project/pull/127065 >From a9631573a2b6d26e8b41de67fac67247ce0b0829 Mon Sep 17 00:00:00 2001 From: Benjamin Maxwell Date: Thu, 13 Feb 2025 14:23:33 + Subject: [PATCH 1/2] [clang] Add `__builtin_sincospi` that lowers to `llvm.sin

[clang] Revert "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #127987)

2025-02-20 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue created https://github.com/llvm/llvm-project/pull/127987 Reverts llvm/llvm-project#126750 Revering while I investigate: https://lab.llvm.org/buildbot/#/builders/72/builds/8406 >From e082cbf5fd4f889762e12062d2544f862339b959 Mon Sep 17 00:00:00 2001 From: Benjamin Max

[clang] Revert "[clang] Lower modf builtin using `llvm.modf` intrinsic" (PR #127987)

2025-02-20 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/127987 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [clang] Add `__builtin_sincospi` that lowers to `llvm.sincospi.*` (PR #127065)

2025-02-21 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/127065 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Fix a typo in StdLibraryFunctionsChecker.cpp comments (PR #133375)

2025-03-28 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue closed https://github.com/llvm/llvm-project/pull/133375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC] Fix a typo in StdLibraryFunctionsChecker.cpp comments (PR #133375)

2025-03-28 Thread Benjamin Maxwell via cfe-commits
https://github.com/MacDue approved this pull request. https://github.com/llvm/llvm-project/pull/133375 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

[clang] [NFC][clang] Split clang/lib/CodeGen/CGBuiltin.cpp into target-specific files (PR #132252)

2025-04-04 Thread Benjamin Maxwell via cfe-commits
MacDue wrote: > This makes a lot of sense to me, just wondering why you chose > `clang/lib/CodeGen/BuiltinTargets/` rather than > `clang/lib/CodeGen/TargetBuiltins/`? The former shounds like it contains the > list of all builtin targets, rather than the codegen for target-specific > builtins.

<    1   2   3