[llvm-branch-commits] [llvm] release/18.x: [PPCMergeStringPool] Only replace constant once (#92996) (PR #93442)
nikic wrote: > What release note should we use for this change? Something like this maybe? > Fix a regression from the 18.1.6 release, which could result in compiler > crashes in the PPCMergeStringPool pass when compiling for PowerPC targets. https://github.com/llvm/llvm-project/pull/93442 ___ 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/18.x: [SystemZ] Bugfix in getDemandedSrcElements(). (#88623) (PR #95463)
nikic wrote: @tstellar Per https://github.com/llvm/llvm-project/issues/95454#issuecomment-2166748656 this is not an LLVM 18 regression, so I'm not sure it counts as critical. The fix does look safe though. https://github.com/llvm/llvm-project/pull/95463 ___ 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] [Hashing] Use a non-deterministic seed (PR #96282)
https://github.com/nikic commented: I like the idea, but I'm not sure this should be always enabled. This sounds like a lot of debugging fun when a seed-dependent case is not caught in testing. Can we have this part of LLVM_REVERSE_ITERATION instead, which is used to detect similar hash iteration stability issues? We have a build bot for it. https://github.com/llvm/llvm-project/pull/96282 ___ 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] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)
@@ -322,24 +306,20 @@ struct hash_state { } }; - -/// A global, fixed seed-override variable. -/// -/// This variable can be set using the \see llvm::set_fixed_execution_seed -/// function. See that function for details. Do not, under any circumstances, -/// set or read this variable. -extern uint64_t fixed_seed_override; - +/// In LLVM_ENABLE_ABI_BREAKING_CHECKS builds, the seed is non-deterministic +/// (address of a variable) to prevent having users depend on the particular +/// hash values. On platforms without ASLR, this is still likely +/// non-deterministic per build. inline uint64_t get_execution_seed() { - // FIXME: This needs to be a per-execution seed. This is just a placeholder - // implementation. Switching to a per-execution seed is likely to flush out - // instability bugs and so will happen as its own commit. - // - // However, if there is a fixed seed override set the first time this is - // called, return that instead of the per-execution seed. - const uint64_t seed_prime = 0xff51afd7ed558ccdULL; - static uint64_t seed = fixed_seed_override ? fixed_seed_override : seed_prime; - return seed; + [[maybe_unused]] static const char seed = 0; nikic wrote: Move this inside the `#if`? https://github.com/llvm/llvm-project/pull/96282 ___ 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] [Hashing] Use a non-deterministic seed if LLVM_ENABLE_ABI_BREAKING_CHECKS (PR #96282)
https://github.com/nikic approved this pull request. LGTM, but please wait a bit in case there is more feedback. https://github.com/llvm/llvm-project/pull/96282 ___ 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] [LV] Disable VPlan-based cost model for 19.x release. (PR #100097)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/100097 ___ 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/19.x: Revert " [LICM] Fold associative binary ops to promote code hoisting (#81608)" (PR #100094)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/100094 ___ 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] [InstCombine][asan] Don't speculate loads before `select ptr` (PR #100773)
@@ -1042,8 +1042,8 @@ Instruction *InstCombinerImpl::visitLoadInst(LoadInst &LI) { } // None of the following transforms are legal for volatile/ordered atomic - // loads. Most of them do apply for unordered atomics. - if (!LI.isUnordered()) return nullptr; + // loads and sanitizers. Most of them do apply for unordered atomics. + if (mustSuppressSpeculation(LI)) return nullptr; nikic wrote: Can we move this check to where it is relevant, i.e. the select fold in particular? Also, should this check be inside isSafeToLoadUnconditionally maybe? https://github.com/llvm/llvm-project/pull/100773 ___ 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] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/100953 ___ 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] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)
https://github.com/nikic commented: This seems fine to me in general. The patch stack seems to be messed up though, or at least this seems to contain some unrelated AMDGPU changes. @jdoerfert Possibly the issue you saw is that this callback just isn't used by the post-link full LTO pipeline at all? It uses invokeFullLinkTimeOptimizationLastEPCallbacks instead. Maybe with this change it would make sense to remove that one and merge it into the main OptimizerLastEPCallback with the appropriate LTOPhase? The other thing I wonder about is whether this argument should be added to other callbacks as well for consistency. https://github.com/llvm/llvm-project/pull/100953 ___ 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] [LLVM][PassBuilder] Extend the function signature of callback for optimizer pipeline extension point (PR #100953)
@@ -2159,7 +2161,7 @@ ModulePassManager PassBuilder::buildO0DefaultPipeline(OptimizationLevel Level, CoroPM.addPass(GlobalDCEPass()); MPM.addPass(CoroConditionalWrapper(std::move(CoroPM))); - invokeOptimizerLastEPCallbacks(MPM, Level); + invokeOptimizerLastEPCallbacks(MPM, Level, ThinOrFullLTOPhase::None); nikic wrote: This doesn't look right. We should pass ThinOrFullLTOPhase through to buildO0DefaultPipeline. https://github.com/llvm/llvm-project/pull/100953 ___ 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] [compiler-rt] [compiler-rt] [rtsan] Revert openat interceptor that breaks fortify-source builds (PR #100876)
nikic wrote: As https://github.com/llvm/llvm-project/pull/101150 has been merged, this one shouldn't be needed on the release branch anymore. https://github.com/llvm/llvm-project/pull/100876 ___ 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] [compiler-rt] release/19.x: [Sanitizers] Avoid overload ambiguity for interceptors (#100986) (PR #101150)
nikic wrote: Release note: > Fixed compiler-rt rtsan build with glibc 2.40 when `_FORTIFY_SOURCE` is > enabled. https://github.com/llvm/llvm-project/pull/101150 ___ 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/19.x: [NVPTX] Fix DwarfFrameBase construction (#101000) (PR #101145)
nikic wrote: Release note: > Fixed test failures in llvm/test/DebugInfo/NVPTX on 32-bit and big endian > architectures. https://github.com/llvm/llvm-project/pull/101145 ___ 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/19.x: [Metadata] Try to merge the first and last ranges. (#101860) (PR #101875)
https://github.com/nikic approved this pull request. @tru This is a bug fix to prevent emission of invalid IR. https://github.com/llvm/llvm-project/pull/101875 ___ 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-tools-extra] release/19.x: [clang-tidy] Fix crash in C language in readability-non-const-parameter (#100461) (PR #101878)
nikic wrote: That would be a question for @PiotrZSL. https://github.com/llvm/llvm-project/pull/101878 ___ 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/19.x: [ADT] Add `` to SmallVector (#101761) (PR #101771)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/101771 ___ 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/19.x: Revert "demangle function names in trace files (#87626)" (PR #102552)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/102552 ___ 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/19.x: [Arm][AArch64][Clang] Respect function's branch protection attributes. (#101978) (PR #102646)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/102646 ___ 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] [InstCombine] Don't look at ConstantData users (PR #103302)
@@ -0,0 +1,576 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -mtriple=arm64 -passes='inline,function(sroa,jump-threading,instcombine)' -S < %s | FileCheck %s nikic wrote: Why can't this be an instcombine only test? https://github.com/llvm/llvm-project/pull/103302 ___ 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] Don't look at ConstantData users (PR #103302)
@@ -0,0 +1,918 @@ +; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 5 +; RUN: opt -mtriple=arm64 -S < %s -passes=instcombine | FileCheck %s nikic wrote: Triple should not be needed. https://github.com/llvm/llvm-project/pull/103302 ___ 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] Don't look at ConstantData users (PR #103302)
nikic wrote: This test still doesn't look anything approaching minimal. Please run it through llvm-reduce. https://github.com/llvm/llvm-project/pull/103302 ___ 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] Don't look at ConstantData users (PR #103302)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/103302 ___ 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] [Support] Use block numbers for LoopInfo BBMap (PR #103400)
nikic wrote: Could we have block renumbering produce a map from old to new numbers, which we can then use for straightforward analysis updates? https://github.com/llvm/llvm-project/pull/103400 ___ 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] Add some brief LLVM 19 release notes for Pointer Authentication ABI support (PR #104657)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/104657 ___ 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/19.x: [llvm][CodeGen] Address the issue discovered In window scheduling (#101665) (PR #102881)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/102881 ___ 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/19.x: [BOLT] Fix relocations handling (PR #102741)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/102741 ___ 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] [AArch64][ARM] Add a release note about _BitInt (PR #101521)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/101521 ___ 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] use default intrinsic attrs for BPF packet loads (PR #105314)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/105314 ___ 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] use default intrinsic attrs for BPF packet loads (PR #105314)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/105314 ___ 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] PR for llvm/llvm-project#80597 (PR #80731)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/80731 ___ 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] Backport [DAGCombine] Fix multi-use miscompile in load combine (#81586) (PR #81633)
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/81633 (cherry picked from commit 25b9ed6e4964344e3710359bec4c831e5a8448b9) >From 377c85908b8e0709c60d378eb3849f7c8bb0eb46 Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 13 Feb 2024 16:41:00 +0100 Subject: [PATCH] [DAGCombine] Fix multi-use miscompile in load combine (#81586) The load combine replaces a number of original loads with one new loads and also replaces the output chains of the original loads with the output chain of the new load. This is incorrect if the original load is retained (due to multi-use), as it may get incorrectly reordered. Fix this by using makeEquivalentMemoryOrdering() instead, which will create a TokenFactor with both chains. Fixes https://github.com/llvm/llvm-project/issues/80911. (cherry picked from commit 25b9ed6e4964344e3710359bec4c831e5a8448b9) --- llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 +- llvm/test/CodeGen/X86/load-combine.ll | 32 +++ 2 files changed, 33 insertions(+), 1 deletion(-) diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 98d8a6d9409f25..3135ec73a99e76 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -9253,7 +9253,7 @@ SDValue DAGCombiner::MatchLoadCombine(SDNode *N) { // Transfer chain users from old loads to the new load. for (LoadSDNode *L : Loads) -DAG.ReplaceAllUsesOfValueWith(SDValue(L, 1), SDValue(NewLoad.getNode(), 1)); +DAG.makeEquivalentMemoryOrdering(L, NewLoad); if (!NeedsBswap) return NewLoad; diff --git a/llvm/test/CodeGen/X86/load-combine.ll b/llvm/test/CodeGen/X86/load-combine.ll index 7f8115dc1ce389..b5f3e789918813 100644 --- a/llvm/test/CodeGen/X86/load-combine.ll +++ b/llvm/test/CodeGen/X86/load-combine.ll @@ -1282,3 +1282,35 @@ define i32 @zext_load_i32_by_i8_bswap_shl_16(ptr %arg) { %tmp8 = or i32 %tmp7, %tmp30 ret i32 %tmp8 } + +define i32 @pr80911_vector_load_multiuse(ptr %ptr, ptr %clobber) nounwind { +; CHECK-LABEL: pr80911_vector_load_multiuse: +; CHECK: # %bb.0: +; CHECK-NEXT:pushl %esi +; CHECK-NEXT:movl {{[0-9]+}}(%esp), %ecx +; CHECK-NEXT:movl {{[0-9]+}}(%esp), %edx +; CHECK-NEXT:movl (%edx), %esi +; CHECK-NEXT:movzwl (%edx), %eax +; CHECK-NEXT:movl $0, (%ecx) +; CHECK-NEXT:movl %esi, (%edx) +; CHECK-NEXT:popl %esi +; CHECK-NEXT:retl +; +; CHECK64-LABEL: pr80911_vector_load_multiuse: +; CHECK64: # %bb.0: +; CHECK64-NEXT:movl (%rdi), %ecx +; CHECK64-NEXT:movzwl (%rdi), %eax +; CHECK64-NEXT:movl $0, (%rsi) +; CHECK64-NEXT:movl %ecx, (%rdi) +; CHECK64-NEXT:retq + %load = load <4 x i8>, ptr %ptr, align 16 + store i32 0, ptr %clobber + store <4 x i8> %load, ptr %ptr, align 16 + %e1 = extractelement <4 x i8> %load, i64 1 + %e1.ext = zext i8 %e1 to i32 + %e1.ext.shift = shl nuw nsw i32 %e1.ext, 8 + %e0 = extractelement <4 x i8> %load, i64 0 + %e0.ext = zext i8 %e0 to i32 + %res = or i32 %e1.ext.shift, %e0.ext + ret i32 %res +} ___ 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] [PowerPC] Update V18.1.0 release notes (PR #81631)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/81631 ___ 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] Backport [DAGCombine] Fix multi-use miscompile in load combine (#81586) (PR #81633)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/81633 ___ 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] Update compiler version expected that seems to be embedded in CHECK line of test at llvm/test/CodeGen/SystemZ/zos-ppa2.ll. (PR #79523)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/79523 ___ 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] Update compiler version expected that seems to be embedded in CHECK line of test at llvm/test/CodeGen/SystemZ/zos-ppa2.ll. (PR #79523)
nikic wrote: A different fix for this was backported in https://github.com/llvm/llvm-project/commit/147c623a86b39d6bc9993293487b5773de943dad, so closing this PR. https://github.com/llvm/llvm-project/pull/79523 ___ 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] Update compiler version expected that seems to be embedded in CHECK line of test at llvm/test/CodeGen/SystemZ/zos-ppa2.ll. (PR #79523)
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/79523 ___ 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] [CFI][annotation] Leave alone function pointers in function annotations (PR #81673)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/81673 ___ 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] Backport ARM64EC variadic args fixes to LLVM 18 (PR #81800)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/81800 ___ 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] Use container on Linux to run llvm-project-tests workflow (#81349) (PR #81807)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/81807 ___ 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] PR for llvm/llvm-project#79861 (PR #80832)
nikic wrote: @tstellar Thanks, should be fixed now. I missed one necessary commit. https://github.com/llvm/llvm-project/pull/80832 ___ 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/18.x: [ValueTracking] Fix computeKnownFPClass for fpext (#81972) (PR #82117)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/82117 ___ 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] PR for llvm/llvm-project#79861 (PR #80832)
nikic wrote: ping @fhahn for backport review https://github.com/llvm/llvm-project/pull/80832 ___ 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/18.x: [InstCombine] Fold gep of exact unsigned division (#82334) (PR #82347)
nikic wrote: Submitting this for backport, because it mitigates an LLVM 18 optimization regression encountered in Rust. The regression is really in a different area, but I think this is the least intrusive way to mitigate it. https://github.com/llvm/llvm-project/pull/82347 ___ 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/18.x: [Loads] Fix crash in isSafeToLoadUnconditionally with scalable accessed type (#82650) (PR #82664)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/82664 ___ 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/18.x: [FlattenCFG] Fix the miscompilation where phi nodes exist in the merge point (#81987) (PR #82925)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/82925 ___ 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/18.x: [GVN] Drop nsw/nuw flags when replacing the result of a with.overflow intrinsic with a overflowing binary operator (#82935) (PR #82965)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/82965 ___ 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][dfa-jump-threading] Allow DFAJumpThreading with optsize (PR #83049)
nikic wrote: This pass is not part of the default pipeline -- do you enable this pass downstream, or do you want to add options for *all* uses of minsize, even if there is no evidence of usefulness? https://github.com/llvm/llvm-project/pull/83049 ___ 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/18.x: [llvm-shlib] Change libLLVM-$MAJOR.so symlink to point to versioned SO (#82660) (PR #83067)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/83067 ___ 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/18.x: [cmake] Add minor version to library SONAME (#79376) (PR #82409)
nikic wrote: > @RalfJung Are you configuring LLVM with > -DLLVM_VERSION_SUFFIX=-rust-1.78.0-nightly ? Yes. > So the problem Rust sees isn't that a ".1" was added to the version, but > rather that the name was changed from "libLLVM-18-rust-1.78.0-nightly.so" to > "libLLVM.so.18.1-rust-1.78.0-nightly". (that is: all the version info > previously went into the library name which comes before ".so", and now goes > into the library version which comes after ".so"). Right. The new scheme requires a symlink for linking, and rustup components currently do not support symlinks. But thankfully we can use a linker script instead of a symlink to sidestep the issue. https://github.com/llvm/llvm-project/pull/82409 ___ 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][dfa-jump-threading] Allow DFAJumpThreading with optsize (PR #83049)
nikic wrote: > As for experimenting, I was hoping that you could just experiment locally > with local changes to LLVM. Is it much easier to experiment with a flag in > LLVM release? If so then this is fine. Agree that experimentation should be done with local changes to LLVM. Options like these tend to get added and never removed, even if they have outlived their usefulness. I could kind of see the rationale for adding it to LoopRotate (which is well-known to be problematic in this regard, and it's plausible to assume that more than one organization would have interest in testing the option), but I wouldn't want to encourage this as a general pattern for exploration of minsize optimization changes. https://github.com/llvm/llvm-project/pull/83049 ___ 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/18.x: [InstCombine] Fix shift calculation in InstCombineCasts (#84027) (PR #84080)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84080 ___ 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] Backport #83980 to 18.x (PR #84023)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84023 ___ 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/18.x: [InstCombine] Fix miscompilation in PR83947 (#83993) (PR #84021)
nikic wrote: There is a test failure. https://github.com/llvm/llvm-project/pull/84021 ___ 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/18.x: [llvm][AArch64] Autoupgrade function attributes from Module attributes. (#82763) (PR #84039)
nikic wrote: Note that a potential regression for this patch was reported at https://github.com/llvm/llvm-project/pull/82763#issuecomment-1981514318. https://github.com/llvm/llvm-project/pull/84039 ___ 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/18.x: [InstCombine] Fix miscompilation in PR83947 (#83993) (PR #84021)
nikic wrote: @dtcxzyw You should be able to push to the branch in the llvmbot repo. https://github.com/llvm/llvm-project/pull/84021 ___ 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] Backport PR83993 to 18.x (PR #84298)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/84298 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. nikic wrote: ```suggestion depending on the code hotness. ``` https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. + +Arguments: +"" + +None. + +Semantics: +"" + +The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`, +deppending on profile used. Expresion is evaluated as `true` iff profile and +summary are availible and profile counter for the block reach hotness threshold. +For each evaluation of a call to this intrinsic, the program must be valid and +correct both if it returns `true` and if it returns `false`. + +When used in a branch condition, it allows us to choose between +two alternative correct solutions for the same problem, like +in example below: + +.. code-block:: text + +%cond = call i1 @llvm.experimental.hot() +br i1 %cond, label %fast_path, label %slow_path + + label %fast_path: +; Omit diagnostics. + + label %slow_path: nikic wrote: ```suggestion slow_path: ``` https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. + +Arguments: +"" + +None. + +Semantics: +"" + +The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`, +deppending on profile used. Expresion is evaluated as `true` iff profile and +summary are availible and profile counter for the block reach hotness threshold. +For each evaluation of a call to this intrinsic, the program must be valid and +correct both if it returns `true` and if it returns `false`. + +When used in a branch condition, it allows us to choose between +two alternative correct solutions for the same problem, like +in example below: + +.. code-block:: text + +%cond = call i1 @llvm.experimental.hot() +br i1 %cond, label %fast_path, label %slow_path + + label %fast_path: nikic wrote: ```suggestion fast_path: ``` https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. + +Arguments: +"" + +None. + +Semantics: +"" + +The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`, nikic wrote: ```suggestion The intrinsic ``@llvm.experimental.hot()`` returns either ``true`` or ``false``, ``` Here and elsewhere. https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. + +Arguments: +"" + +None. + +Semantics: +"" + +The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`, +deppending on profile used. Expresion is evaluated as `true` iff profile and nikic wrote: ```suggestion depending on profile used. Expresion is evaluated as `true` iff profile and ``` https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
@@ -27639,6 +27639,54 @@ constant `true`. However it is always correct to replace it with any other `i1` value. Any pass can freely do it if it can benefit from non-default lowering. +'``llvm.experimental.hot``' Intrinsic +^ + +Syntax: +""" + +:: + + declare i1 @llvm.experimental.hot() + +Overview: +" + +This intrinsic returns true iff it's known that containing basic block is hot in +profile. + +When used with profile based optimization allows to change program behaviour +deppending on the code hotness. + +Arguments: +"" + +None. + +Semantics: +"" + +The intrinsic ``@llvm.experimental.hot()`` returns either `true` or `false`, +deppending on profile used. Expresion is evaluated as `true` iff profile and +summary are availible and profile counter for the block reach hotness threshold. nikic wrote: ```suggestion summary are available and profile counter for the block reach hotness threshold. ``` https://github.com/llvm/llvm-project/pull/84850 ___ 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] [IR] Introduce `llvm.experimental.hot()` (PR #84850)
nikic wrote: Please submit an RFC on discourse for this change. https://github.com/llvm/llvm-project/pull/84850 ___ 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/18.x: [DSE] Remove malloc from EarliestEscapeInfo before removing. (#84157) (PR #84946)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/84946 ___ 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/18x: [clang] Avoid -Wshadow warning when init-capture named same as class … (PR #84912)
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/84912 ___ 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/18.x: [X86] Add missing subvector_subreg_lowering for BF16 (#83720) (PR #83834)
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/83834 ___ 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/18.x: [X86] Add missing subvector_subreg_lowering for BF16 (#83720) (PR #84491)
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/84491 ___ 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] [openmp] release/18.x: [openmp] __kmp_x86_cpuid fix for i386/PIC builds. (#84626) (PR #85053)
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/85053 ___ 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] [openmp] release/18.x: [openmp] __kmp_x86_cpuid fix for i386/PIC builds. (#84626) (PR #85053)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/85053 ___ 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-tools-extra] [clangd] Add clangd 18 release notes (PR #84436)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/84436 ___ 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/18.x: [ARM] Switch to LiveRegUnits to fix r7 register allocation bug (PR #84475)
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/84475 ___ 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] [lld] [llvm] Backport fixes for ARM64EC import libraries (PR #84590)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/84590 ___ 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] [lld] [llvm] [openmp] SystemZ release notes for 18.x. (PR #84560)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/84560 ___ 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/18.x: [ObjC] Check entire chain of superclasses to determine class layout (PR #84093)
https://github.com/nikic closed https://github.com/llvm/llvm-project/pull/84093 ___ 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] workflows: Add workaround for lld failures on MacOS (#85021) (PR #85110)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/85110 ___ 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] [lld] [llvm] Backport fixes for ARM64EC import libraries (PR #84590)
@@ -91,6 +120,10 @@ struct COFFShortExport { /// file, this is "baz" in "EXPORTS\nfoo = bar == baz". std::string AliasTarget; + /// Specifies EXPORTAS name. In a .def file, this is "bar" in + /// "EXPORTS\nfoo EXPORTAS bar". + std::string ExportAs; nikic wrote: This looks like an ABI break. https://github.com/llvm/llvm-project/pull/84590 ___ 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] Backport #85277 (PR #85422)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/85422 ___ 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/18.x: [InstCombine] Drop UB-implying attrs/metadata after speculating an instruction (#85542) (PR #85562)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/85562 ___ 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/18.x: [llvm-shlib] Fix the version naming style of libLLVM for Windows (#85710) (PR #85746)
https://github.com/nikic approved this pull request. A bit unfortunate to have these changes post-release, but I think we do need to make them. https://github.com/llvm/llvm-project/pull/85746 ___ 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/18.x: workflows: Fix baseline version for llvm abi checks (#85166) (PR #85789)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/85789 ___ 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] [CostModel] No cost for llvm.allow.{runtime, ubsan}.check() (PR #86064)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86064 ___ 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] [dse] Skip llvm.allow.{runtime, ubsan}.check() (PR #86067)
nikic wrote: I don't think that this change is necessary. The InaccessibleMemOnly modelling will take care of it. https://github.com/llvm/llvm-project/pull/86067 ___ 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/18.x: backport PR84230 (PR #86106)
https://github.com/nikic approved this pull request. https://github.com/llvm/llvm-project/pull/86106 ___ 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/18.x: [ConstantRange] Fix off by 1 bugs in UIToFP and SIToFP handling. (#86041) (PR #86153)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/86153 ___ 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/18.x: [SLP]Fix a crash if the argument of call was affected by minbitwidth analysis (PR #86731)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/86731 ___ 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/18.x: [X86] Fix miscompile in combineShiftRightArithmetic (PR #86728)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/86728 ___ 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/18.x [X86_64] fix SSE type error in vaarg (PR #86698)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/86698 ___ 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/18.x [SelectionDAG] Prevent combination on inconsistent type in 'carryDiamond' (PR #86697)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/86697 ___ 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/18.x: [InstSimplify] Make sure the simplified value doesn't generate poison in threadBinOpOverSelect (#87075) (PR #88353)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/88353 ___ 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] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/88818 ___ 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] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
https://github.com/nikic created https://github.com/llvm/llvm-project/pull/88818 …omic max (#77072)" These changes caused correctness regressions observed in Rust, see https://github.com/llvm/llvm-project/pull/77072#issuecomment-2049009507 and following. Revert the incorrect changes from the release branch. This reverts commit 0e501dbd932ef1c6f4e747c83bf33beef0a09ecf. This reverts commit fbb27d16fa12aa595cbd20a1fb5f1c5b80748fa4. >From 8b6d4e5d2293ee529405988780d65f0700d6275a Mon Sep 17 00:00:00 2001 From: Nikita Popov Date: Tue, 16 Apr 2024 09:10:46 +0900 Subject: [PATCH] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" These changes caused correctness regressions observed in Rust, see https://github.com/llvm/llvm-project/pull/77072#issuecomment-2049009507. This reverts commit 0e501dbd932ef1c6f4e747c83bf33beef0a09ecf. This reverts commit fbb27d16fa12aa595cbd20a1fb5f1c5b80748fa4. --- llvm/lib/Target/Mips/MipsExpandPseudo.cpp | 60 +-- llvm/test/CodeGen/Mips/atomic-min-max.ll | 615 +++--- 2 files changed, 81 insertions(+), 594 deletions(-) diff --git a/llvm/lib/Target/Mips/MipsExpandPseudo.cpp b/llvm/lib/Target/Mips/MipsExpandPseudo.cpp index c30129743a9626..2c2554b5b4bc3b 100644 --- a/llvm/lib/Target/Mips/MipsExpandPseudo.cpp +++ b/llvm/lib/Target/Mips/MipsExpandPseudo.cpp @@ -388,32 +388,18 @@ bool MipsExpandPseudo::expandAtomicBinOpSubword( Opcode = Mips::XOR; break; case Mips::ATOMIC_LOAD_UMIN_I8_POSTRA: -IsUnsigned = true; -IsMin = true; -break; case Mips::ATOMIC_LOAD_UMIN_I16_POSTRA: IsUnsigned = true; -IsMin = true; -break; +[[fallthrough]]; case Mips::ATOMIC_LOAD_MIN_I8_POSTRA: -SEOp = Mips::SEB; -IsMin = true; -break; case Mips::ATOMIC_LOAD_MIN_I16_POSTRA: IsMin = true; break; case Mips::ATOMIC_LOAD_UMAX_I8_POSTRA: -IsUnsigned = true; -IsMax = true; -break; case Mips::ATOMIC_LOAD_UMAX_I16_POSTRA: IsUnsigned = true; -IsMax = true; -break; +[[fallthrough]]; case Mips::ATOMIC_LOAD_MAX_I8_POSTRA: -SEOp = Mips::SEB; -IsMax = true; -break; case Mips::ATOMIC_LOAD_MAX_I16_POSTRA: IsMax = true; break; @@ -475,42 +461,14 @@ bool MipsExpandPseudo::expandAtomicBinOpSubword( // For little endian we need to clear uninterested bits. if (STI->isLittle()) { - if (!IsUnsigned) { -BuildMI(loopMBB, DL, TII->get(Mips::SRAV), OldVal) -.addReg(OldVal) -.addReg(ShiftAmnt); -BuildMI(loopMBB, DL, TII->get(Mips::SRAV), Incr) -.addReg(Incr) -.addReg(ShiftAmnt); -if (STI->hasMips32r2()) { - BuildMI(loopMBB, DL, TII->get(SEOp), OldVal).addReg(OldVal); - BuildMI(loopMBB, DL, TII->get(SEOp), Incr).addReg(Incr); -} else { - const unsigned ShiftImm = SEOp == Mips::SEH ? 16 : 24; - BuildMI(loopMBB, DL, TII->get(Mips::SLL), OldVal) - .addReg(OldVal, RegState::Kill) - .addImm(ShiftImm); - BuildMI(loopMBB, DL, TII->get(Mips::SRA), OldVal) - .addReg(OldVal, RegState::Kill) - .addImm(ShiftImm); - BuildMI(loopMBB, DL, TII->get(Mips::SLL), Incr) - .addReg(Incr, RegState::Kill) - .addImm(ShiftImm); - BuildMI(loopMBB, DL, TII->get(Mips::SRA), Incr) - .addReg(Incr, RegState::Kill) - .addImm(ShiftImm); -} - } else { -// and OldVal, OldVal, Mask -// and Incr, Incr, Mask -BuildMI(loopMBB, DL, TII->get(Mips::AND), OldVal) -.addReg(OldVal) -.addReg(Mask); -BuildMI(loopMBB, DL, TII->get(Mips::AND), Incr) -.addReg(Incr) -.addReg(Mask); - } + // and OldVal, OldVal, Mask + // and Incr, Incr, Mask + BuildMI(loopMBB, DL, TII->get(Mips::AND), OldVal) + .addReg(OldVal) + .addReg(Mask); + BuildMI(loopMBB, DL, TII->get(Mips::AND), Incr).addReg(Incr).addReg(Mask); } + // unsigned: sltu Scratch4, oldVal, Incr // signed: slt Scratch4, oldVal, Incr BuildMI(loopMBB, DL, TII->get(SLTScratch4), Scratch4) diff --git a/llvm/test/CodeGen/Mips/atomic-min-max.ll b/llvm/test/CodeGen/Mips/atomic-min-max.ll index a96581bdb39a4c..f953c885ea7345 100644 --- a/llvm/test/CodeGen/Mips/atomic-min-max.ll +++ b/llvm/test/CodeGen/Mips/atomic-min-max.ll @@ -3,7 +3,6 @@ ; RUN: llc -march=mips -O0 -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPSR6 ; RUN: llc -march=mips -O0 -mcpu=mips32r2 -mattr=+micromips -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MM ; RUN: llc -march=mips -O0 -mcpu=mips32r6 -mattr=+micromips -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MMR6 -; RUN: llc -march=mipsel -O0 -mcpu=mips32 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPS32 ; RUN: llc -march=mipsel -O0
[llvm-branch-commits] [llvm] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
https://github.com/nikic edited https://github.com/llvm/llvm-project/pull/88818 ___ 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] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
nikic wrote: I'd also add that this fixes a regression from a previous LLVM 18 point release: > Fix regressions introduced in LLVM 18.1.3 in MIPS atomicrmw min/max codegen. https://github.com/llvm/llvm-project/pull/88818 ___ 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/18x:[X86] Fix typo: QWORD alignment is greater than or equal to 8, not greater than 8 (#87819) (PR #88394)
https://github.com/nikic milestoned https://github.com/llvm/llvm-project/pull/88394 ___ 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/18x:[X86] Fix typo: QWORD alignment is greater than or equal to 8, not greater than 8 (#87819) (PR #88394)
nikic wrote: This looks like an optimization improvement, not a bug fix, to me, and as such should not be backported. https://github.com/llvm/llvm-project/pull/88394 ___ 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] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
nikic wrote: @yingopq The patches are not reverted in main, so you can base your fix on top of the existing changes (or revert them as part of your PR, if that's easier?) https://github.com/llvm/llvm-project/pull/88818 ___ 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] Revert "[Mips] Fix missing sign extension in expansion of sub-word atomic max (#77072)" (PR #88818)
nikic wrote: Given that this change has already caused two distinct bugs, I don't think we will accept a backport for it anyway, so don't worry about the release branch. https://github.com/llvm/llvm-project/pull/88818 ___ 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/18.x: [InstCombine] Fix unexpected overwriting in `foldSelectWithSRem` (#89539) (PR #89546)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/89546 ___ 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/18.x: [IRCE] Skip icmp ptr in `InductiveRangeCheck::parseRangeCheckICmp` (#89967) (PR #90182)
https://github.com/nikic approved this pull request. LGTM https://github.com/llvm/llvm-project/pull/90182 ___ llvm-branch-commits mailing list llvm-branch-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits