[llvm-branch-commits] [llvm] release/21.x: [VPlan] Don't narrow op multiple times in narrowInterleaveGroups. (PR #158013)

2025-09-15 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/158013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/21.x: [RISCV] Support PreserveMost calling convention (#148214) (PR #158403)

2025-09-13 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Duplicate of https://github.com/llvm/llvm-project/pull/158402. https://github.com/llvm/llvm-project/pull/158403 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-br

[llvm-branch-commits] [llvm] release/21.x: [RISCV] Support PreserveMost calling convention (#148214) (PR #158403)

2025-09-13 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/158403 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/21.x: [VPlan] Don't narrow op multiple times in narrowInterleaveGroups. (PR #158013)

2025-09-12 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/158013 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [AMDGPU] Generate canonical additions in AMDGPUPromoteAlloca (PR #157810)

2025-09-12 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/157810 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [InstCombine] Set !prof metadata on selects (PR #157599)

2025-09-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: TBH I don't think selects should be validated by profcheck at all, only branches. https://github.com/llvm/llvm-project/pull/157599 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mail

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > This was merged to the release branch - the PR didn't update since I didn't > have access to write to your repo @nikic (don't forget to check the "allow > maintainer to write" checkbox in the future). Huh, this is weird. I checked a few other PRs I have open, and they all have i

[llvm-branch-commits] [llvm] [MC] Rewrite stdin.s to use python (PR #157232)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > > I don't know if I understand what you're going for in this patch. How is > > this an improvement over just keeping REQUIRES: shell? The REQUIRES: bit > > is what's going to stop the test from running in the wrong environment. > > That seems like the right tradeoff. > > If we

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/157410 Backport of: https://github.com/llvm/llvm-project/commit/a6148071300302b451ae92fbd8f8b955a6974891 https://github.com/llvm/llvm-project/commit/ec581e460ae92ef29c1ea4f200b36b79188fdd21 https://github.com/llvm/ll

[llvm-branch-commits] [llvm] release/21.x: [SCEVExp] Fix early exit in ComputeEndCheck. (PR #157410)

2025-09-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/157410 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
nikic wrote: As this test runs the whole optimization pipeline, please move it to llvm/test/Transforms/PhaseOrdering. https://github.com/llvm/llvm-project/pull/151649 ___ llvm-branch-commits mailing list llvm-branch-

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/151649 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-07 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/151649 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/21.x: [clang][docs] Fix implicit-int-conversion-on-negation typos (PR #156815)

2025-09-04 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/156815 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -697,8 +697,7 @@ static bool isSafeAndProfitableToSinkLoad(LoadInst *L) { Instruction *InstCombinerImpl::foldPHIArgLoadIntoPHI(PHINode &PN) { LoadInst *FirstLI = cast(PN.getIncomingValue(0)); - // Can't forward swifterror through a phi. - if (FirstLI->getOperand(0)->isS

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -0,0 +1,167 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5 +; RUN: opt -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck --check-prefix=NOPAUTH %s +; RUN: opt -passes=pre-isel-intrinsic-lowering -m

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; nikic wrote: Unused? https://github.com/llvm/llvm-project/pull/151

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -2850,6 +2850,12 @@ def int_experimental_convergence_anchor def int_experimental_convergence_loop : DefaultAttrsIntrinsic<[llvm_token_ty], [], [IntrNoMem, IntrConvergent]>; +//===- Structure Protection Intrinsics ===// + +def int_prote

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-09-02 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +463,162 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155513)

2025-08-27 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/155513 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155492)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase { /// contain data that is address discriminated. This includes /// implicitly authenticated values like vtable pointers, as well as /// explicitly qualified fields. - bool containsAddressDiscriminatedPointerAu

[llvm-branch-commits] [clang] release/21.x: [clang][PAC] Fix builtins that claim address discriminated types are bitwise compatible (#154490) (PR #155492)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -634,7 +634,7 @@ class ASTContext : public RefCountedBase { /// contain data that is address discriminated. This includes /// implicitly authenticated values like vtable pointers, as well as /// explicitly qualified fields. - bool containsAddressDiscriminatedPointerAu

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -553,16 +553,17 @@ void Instruction::dropUBImplyingAttrsAndUnknownMetadata( } void Instruction::dropUBImplyingAttrsAndMetadata(ArrayRef Keep) { nikic wrote: I think the `Keep` is no longer needed now, but I guess it doesn't hurt to keep it... https://git

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
@@ -1,20 +1,21 @@ -; NOTE: Assertions have been autogenerated by update_test_checks.py +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --check-globals all --version 5 nikic wrote: I think you don't need the `--check-globals`,

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/154635 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [IR] Add `MD_prof` to the `Keep` list of `dropUBImplyingAttrsAndMetadata` (PR #154635)

2025-08-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/154635 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [Local] preserve `MD_prof` in `hoistAllInstructionsInto` (PR #154635)

2025-08-25 Thread Nikita Popov via llvm-branch-commits
@@ -498,6 +498,7 @@ LLVM_ABI void dropDebugUsers(Instruction &I); /// /// The moved instructions receive the insertion point debug location values /// (DILocations) and their debug intrinsic instructions are removed. +/// Selects and indirect calls keep their MD_prof metadata.

[llvm-branch-commits] [libcxx] release/21.x [libc++] Fix ABI break introduced by switching to _LIBCPP_COMPRESSED_PAIR (#154686) (PR #155251)

2025-08-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. We need to also either backport a fix for lldb tests or disable the relevant tests. That needs to happen as part of this PR. https://github.com/llvm/llvm-project/pull/155251 ___ llvm-bra

[llvm-branch-commits] [llvm] [SelectionDAGBuilder] Use address width when lowering ptrtoaddr (PR #139423)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/139423 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
nikic wrote: You can probably achieve that just by adding a function call before the select (where the function is not known willreturn/nounwind). https://github.com/llvm/llvm-project/pull/152420 ___ llvm-branch-comm

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-11 Thread Nikita Popov via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-09 Thread Nikita Popov via llvm-branch-commits
nikic wrote: All this tests needs is a hoistable select with prof metadata. You do not need any of the blockaddress / indirectbr stuff. https://github.com/llvm/llvm-project/pull/152420 ___ llvm-branch-commits mailing

[llvm-branch-commits] [llvm] [ir] MD_prof is not UB-implying (PR #152420)

2025-08-09 Thread Nikita Popov via llvm-branch-commits
@@ -1678,6 +1680,8 @@ void Instruction::dropUnknownNonDebugMetadata(ArrayRef KnownIDs) { // A DIAssignID attachment is debug metadata, don't drop it. KnownSet.insert(LLVMContext::MD_DIAssignID); + if (!ProfcheckDisableMetadataFixes) +KnownSet.insert(LLVMContext::MD_p

[llvm-branch-commits] [CaptureTracking] Handle ptrtoaddr (PR #152221)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/152221 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [lldb] [lldb-dap] fix crash if disconnect request is not sent. (PR #148878)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/148878 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [lldb] [lldb-dap] fix crash if disconnect request is not sent. (PR #148878)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/148878 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fix std::make_exception_ptr interaction with ObjC (#135386) (PR #147554)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/147554 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [libcxx] release/20.x: [libc++] Fix std::make_exception_ptr interaction with ObjC (#135386) (PR #147554)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147554 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/147448 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [CoroSplit] Always erase lifetime intrinsics for spilled allocas (#142551) (PR #147448)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/147448 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/20.x: [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749) (PR #142909)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/142909 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] release/20.x: [clang-repl] Ensure clang-repl accepts all C keywords supported in all language models (#142749) (PR #142909)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/142909 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Fix ninf propagation for fcmp+sel -> minmax (#136433) (PR #137605)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/137605 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [InstCombine] Fix ninf propagation for fcmp+sel -> minmax (#136433) (PR #137605)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/137605 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/20.x: [LV] Fix crash when building partial reductions using types that aren't known scale factors (#136680) (PR #136863)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/136863 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [llvm] release/20.x: [LV] Fix crash when building partial reductions using types that aren't known scale factors (#136680) (PR #136863)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/136863 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [flang] release/20.x: [flang] Fix missed case of symbol renaming in module file generation (#132475) (PR #133223)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Closing this as LLVM 20 no longer accepts backports. https://github.com/llvm/llvm-project/pull/133223 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commi

[llvm-branch-commits] [flang] release/20.x: [flang] Fix missed case of symbol renaming in module file generation (#132475) (PR #133223)

2025-08-08 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/133223 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [llvm][cmake] Turn runtime in PROJECTS warnings into FATAL_ERROR (PR #152302)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. This is absolutely inappropriate to land on the release branch. Feel free to update the version numbers -- or better, remove the mention of specific versions entirely. These will get removed when we are ready to remove them, not

[llvm-branch-commits] [flang] release/21.x: [flang][cmake] Fix bbc dependencies (#152306) (PR #152364)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/152364 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3490,19 +3514,25 @@ void SelectionDAGBuilder::visitCallBr(const CallBrInst &I) { // Update successor info. addSuccessorWithProb(CallBrMBB, Return, BranchProbability::getOne()); - for (unsigned i = 0, e = I.getNumIndirectDests(); i < e; ++i) { -BasicBlock *Dest =

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -9674,7 +9678,7 @@ This instruction requires several arguments: indicates the function accepts a variable number of arguments, the extra arguments can be specified. #. '``fallthrough label``': the label reached when the inline assembly's - execution exits the bottom.

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
nikic wrote: I think it would be a good idea to land the refactorings here (which just split things into separate methods) as a separate NFC change. It's kind of hard to follow what's going on here with all the code movements mixed in. https://github.com/llvm

[llvm-branch-commits] [llvm] [polly] [IR] Add CallBr intrinsics support (PR #133907)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3006,10 +3024,41 @@ bool IRTranslator::translateInvoke(const User &U, return true; } +/// The intrinsics currently supported by callbr are implicit control flow +/// intrinsics such as amdgcn.kill. bool IRTranslator::translateCallBr(const User &U,

[llvm-branch-commits] [CaptureTracking] Handle ptrtoaddr (PR #152221)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -359,6 +359,11 @@ UseCaptureInfo llvm::DetermineUseCaptureKind(const Use &U, const Value *Base) { case Instruction::AddrSpaceCast: // The original value is not captured via this if the new value isn't. return UseCaptureInfo::passthrough(); + case Instruction::Ptr

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Should also add an entry in https://llvm.org/docs/LangRef.html#constant-expressions. https://github.com/llvm/llvm-project/pull/139357 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/139357 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) { visitInstruction(I); } +void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) { + // Get the source and destination types + Type *SrcTy = I.getOperand(0)->getType(); + Type *DestTy = I.getType(); + + Ch

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/139357 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -731,6 +731,12 @@ class TargetTransformInfoImplBase { return 0; break; } +case Instruction::PtrToAddr: { + unsigned DstSize = Dst->getScalarSizeInBits(); + if (DL.isLegalInteger(DstSize) && DstSize >= DL.getAddressSizeInBits(Src)) ---

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -3532,6 +3533,28 @@ void Verifier::visitFPToSIInst(FPToSIInst &I) { visitInstruction(I); } +void Verifier::visitPtrToAddrInst(PtrToAddrInst &I) { + // Get the source and destination types + Type *SrcTy = I.getOperand(0)->getType(); + Type *DestTy = I.getType(); + + Ch

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -1482,6 +1482,20 @@ Constant *llvm::ConstantFoldCastOperand(unsigned Opcode, Constant *C, switch (Opcode) { default: llvm_unreachable("Missing case"); + case Instruction::PtrToAddr: +if (auto *GEP = dyn_cast(C)) { + // For now just handle the basic case of

[llvm-branch-commits] [llvm] [IR] Introduce the `ptrtoaddr` instruction (PR #139357)

2025-08-06 Thread Nikita Popov via llvm-branch-commits
@@ -12521,6 +12521,59 @@ Example: %Y = ptrtoint ptr %P to i64; yields zero extension on 32-bit architecture %Z = ptrtoint <4 x ptr> %P to <4 x i64>; yields vector zero extension for a vector of addresses on 32-bit architecture +.. _i_ptrto

[llvm-branch-commits] [llvm] [ConstraintElim] Simplify `usub_with_overflow` when A uge B (PR #135785)

2025-08-05 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM, though I wouldn't expect to see much usub.with.overflow in the middle-end. https://github.com/llvm/llvm-project/pull/135785 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

[llvm-branch-commits] [llvm] release/21.x: [llvm][sroa] Disable support for `invariant.group` (#151743) (PR #152099)

2025-08-05 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/152099 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-08-04 Thread Nikita Popov via llvm-branch-commits
nikic wrote: That sounds fine as long as the plan is to remove the isNonIntegralPointer() method in the future, in favor of more precise checks. https://github.com/llvm/llvm-project/pull/105735 ___ llvm-branch-commits mailing list llvm-branch-commits@

[llvm-branch-commits] [llvm] RuntimeLibcalls: Remove darwin override of half convert libcalls (PR #148782)

2025-08-03 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/148782 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] AlwaysInliner: A new inlining algorithm to interleave alloca promotion with inlines. (PR #145613)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: This looks like a simple missed optimization in InstCombine. My first thought would be to handle this via foldOpIntoPhi for selects: https://github.com/nikic/llvm-project/commit/c7d9b006453275be94894c6afdae5f6c940c1621 But this isn't quite correc

[llvm-branch-commits] [IR] Make BranchInst operand order consistent (PR #151673)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Ah, I didn't realize that it's always based on op_end. Maybe this change is not actually that bad if combined with the new successors() representation? Then the successors iterator is not going to through through getSuccessor() anymore and it will have less impact? https://github

[llvm-branch-commits] [llvm] release/21.x: [DAG] visitFREEZE - limit freezing of multiple operands (PR #150425)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. LGTM, though I'd probably squash the first two commits. The back and forth is confusing. https://github.com/llvm/llvm-project/pull/150425 ___ llvm-branch-commits mailing list llvm-branch-commits@lis

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +465,198 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Use update_test_checks.py. https://github.com/llvm/llvm-project/pull/151647 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bra

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -0,0 +1,46 @@ +; RUN: opt -passes=pre-isel-intrinsic-lowering -S < %s | FileCheck --check-prefixes=CHECK,NOPAUTH %s +; RUN: opt -passes=pre-isel-intrinsic-lowering -mattr=+pauth -S < %s | FileCheck --check-prefixes=CHECK,PAUTH %s + +target triple = "aarch64-unknown-linux-gnu"

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -37,6 +39,8 @@ #include "llvm/Transforms/Utils/LowerMemIntrinsics.h" #include "llvm/Transforms/Utils/LowerVectorIntrinsics.h" +#include nikic wrote: Do not use `std::set` unless you actually need an ordered set. Based on usage, you want SmallPtrSet. htt

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -31161,3 +31161,57 @@ This intrinsic is assumed to execute in the default :ref:`floating-point environment ` *except* for the rounding mode. This intrinsic is not supported on all targets. Some targets may not support all rounding modes. + +'``llvm.protected.field.ptr``' In

[llvm-branch-commits] Add llvm.protected.field.ptr intrinsic and pre-ISel lowering. (PR #151647)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -461,6 +465,198 @@ bool PreISelIntrinsicLowering::expandMemIntrinsicUses( return Changed; } +namespace { + +enum class PointerEncoding { + Rotate, + PACCopyable, + PACNonCopyable, +}; + +bool expandProtectedFieldPtr(Function &Intr) { + Module &M = *Intr.getParent(); +

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -0,0 +1,33 @@ +; RUN: opt -O2 -S < %s | FileCheck %s + +; Test that no optimization run at -O2 moves the loads into the exit block, +; as this causes unnecessary address escapes with pointer field protection. + +target triple = "aarch64-unknown-linux-gnu" nikic

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -3846,10 +3846,7 @@ bool llvm::canReplaceOperandWithVariable(const Instruction *I, unsigned OpIdx) { if (Op->getType()->isMetadataTy()) return false; - // swifterror pointers can only be used by a load, store, or as a swifterror - // argument; swifterror pointers a

[llvm-branch-commits] Utils: Inhibit load/store folding through phis for llvm.protected.field.ptr. (PR #151649)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Use update_test_checks.py. https://github.com/llvm/llvm-project/pull/151649 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bra

[llvm-branch-commits] SROA: Recognize llvm.protected.field.ptr intrinsics. (PR #151650)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Use update_test_checks.py. Please also add a test where the alloca is split but not promoted. https://github.com/llvm/llvm-project/pull/151650 ___ llvm-branch-commits mailing list llvm-branch-commits@lis

[llvm-branch-commits] SROA: Recognize llvm.protected.field.ptr intrinsics. (PR #151650)

2025-08-01 Thread Nikita Popov via llvm-branch-commits
@@ -0,0 +1,41 @@ +; RUN: opt -passes=sroa -S < %s | FileCheck %s + +target triple = "aarch64-unknown-linux-gnu" nikic wrote: Is this triple necessary? If not, drop it, otherwise add REQUIRES. https://github.com/llvm/llvm-project/pull/151650 _

[llvm-branch-commits] MachineInstrBuilder: Introduce copyMIMetadata() function. (PR #133535)

2025-07-31 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/133535 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] MachineInstrBuilder: Introduce copyMIMetadata() function. (PR #133535)

2025-07-31 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic commented: LGTM Something I don't entirely like is that MIMetadata holds DebugLoc, but copyMIMetadata does not copy it -- instead, it needs to be passed to CreateMachineInstr. But given how this is used it's not really a problem... https://github.com/llvm/llvm-project

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-07-31 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > I'm not actively aware of any cases where the non-integrality is being used > to block invalid optimizations ... but I do know that, for example, > SeparateConstOffsetFromGEP has a mode (which I think Nvidia uses) that turns > pointer arithmetic into ptrtoint/inttoptr pairs. Th

[llvm-branch-commits] [clang] release/21.x: [CMake][Release] Build with -ffat-lto-objects (#140381) (PR #151245)

2025-07-30 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Looks like the release binaries jobs are failing. https://github.com/llvm/llvm-project/pull/151245 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] [DataLayout][LangRef] Split non-integral and unstable pointer properties (PR #105735)

2025-07-30 Thread Nikita Popov via llvm-branch-commits
nikic wrote: > I would be happy to change this to just unstable and external state. I'm not > particularly happy with this name but I can't come up with something better. I think we should do that. https://github.com/llvm/llvm-project/pull/105735 ___

[llvm-branch-commits] [clang] [llvm] release/21.x [ObjCARC] Delete empty autoreleasepools with no autoreleases in them and remove ObjCARCAPElimPass (PR #150771)

2025-07-29 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Yes, I feel strongly that this should not be backported. This patch is both unimportant and risky. https://github.com/llvm/llvm-project/pull/150771 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm

[llvm-branch-commits] [llvm] a268b61 - Add test

2025-07-28 Thread Nikita Popov via llvm-branch-commits
Author: Nikita Popov Date: 2025-07-28T10:02:10+02:00 New Revision: a268b616a622b20056c908c53aa762d1fc5402f1 URL: https://github.com/llvm/llvm-project/commit/a268b616a622b20056c908c53aa762d1fc5402f1 DIFF: https://github.com/llvm/llvm-project/commit/a268b616a622b20056c908c53aa762d1fc5402f1.diff

[llvm-branch-commits] [llvm] 4a2a360 - Revert "[MIPS]Fix QNaNs in the MIPS legacy NaN encodings (#139829)"

2025-07-28 Thread Nikita Popov via llvm-branch-commits
Author: Nikita Popov Date: 2025-07-28T09:52:06+02:00 New Revision: 4a2a3608513404b7005f96c1b4476f91d34f01de URL: https://github.com/llvm/llvm-project/commit/4a2a3608513404b7005f96c1b4476f91d34f01de DIFF: https://github.com/llvm/llvm-project/commit/4a2a3608513404b7005f96c1b4476f91d34f01de.diff

[llvm-branch-commits] [llvm] release/21.x: Align f128 and i128 to 16 bytes when passing on x86-32 (PR #150746)

2025-07-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/150746 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/21.x: Align f128 and i128 to 16 bytes when passing on x86-32 (PR #150746)

2025-07-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/150746 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [clang] [llvm] release/21.x [ObjCARC] Delete empty autoreleasepools with no autoreleases in them and remove ObjCARCAPElimPass (PR #150771)

2025-07-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic requested changes to this pull request. I don't think this should be backported. https://github.com/llvm/llvm-project/pull/150771 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cg

[llvm-branch-commits] [clang] [llvm] release/21.x [ObjCARC] Delete empty autoreleasepools with no autoreleases in them and remove ObjCARCAPElimPass (PR #150771)

2025-07-26 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/150771 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] release/21.x: [CodeGenPrepare] Make sure that `AddOffset` is also a loop invariant (#150625) (PR #150646)

2025-07-25 Thread Nikita Popov via llvm-branch-commits
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/150646 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

[llvm-branch-commits] [llvm] TableGen: Emit perfect hash function for runtime libcalls (PR #150192)

2025-07-25 Thread Nikita Popov via llvm-branch-commits
nikic wrote: @vvereschaka That issue only needs the change to the sort predicate, not this whole PR. https://github.com/llvm/llvm-project/pull/150192 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bi

[llvm-branch-commits] [llvm] [DAG] visitFREEZE - limit freezing of multiple operands (PR #150425)

2025-07-25 Thread Nikita Popov via llvm-branch-commits
nikic wrote: Do we need all of those? For the release branch, can we revert the change fully? Or is other stuff already based on it? https://github.com/llvm/llvm-project/pull/150425 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.o

  1   2   3   4   5   6   7   >