[llvm-branch-commits] [llvm] 9e084f4 - Fix building with GCC 12:

Tom Stellard via llvm-branch-commits llvm-branch-commits at lists.llvm.org
Tue Nov 9 20:57:50 PST 2021


Author: Martin Liska
Date: 2021-11-09T20:57:18-08:00
New Revision: 9e084f4194e6a06c3b94be4358975da333d05146

URL: https://github.com/llvm/llvm-project/commit/9e084f4194e6a06c3b94be4358975da333d05146
DIFF: https://github.com/llvm/llvm-project/commit/9e084f4194e6a06c3b94be4358975da333d05146.diff

LOG: Fix building with GCC 12:

Fixes: https://bugs.llvm.org/show_bug.cgi?id=52380

Differential Revision: https://reviews.llvm.org/D112990

(cherry picked from commit c5029023fb076f72a3e5bf26085642bcd1fa22fb)

Added: 
    

Modified: 
    llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
index 493c1ad87f93d..d6dd807afbce3 100644
--- a/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
+++ b/llvm/lib/Target/AMDGPU/SILoadStoreOptimizer.cpp
@@ -2048,7 +2048,7 @@ SILoadStoreOptimizer::collectMergeableInsts(
     // adjacent to each other in the list, which will make it easier to find
     // matches.
     MergeList.sort(
-        [] (const CombineInfo &A, CombineInfo &B) {
+        [] (const CombineInfo &A, const CombineInfo &B) {
           return A.Offset < B.Offset;
         });
     ++I;


        


More information about the llvm-branch-commits mailing list