[llvm] 2d975f1 - [GlobalISel] Fix std::max after D134380

Fangrui Song via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 21 14:09:13 PDT 2022


Author: Fangrui Song
Date: 2022-09-21T14:09:04-07:00
New Revision: 2d975f1efe6cdb4f6303cfe33a3a06cbe02e755a

URL: https://github.com/llvm/llvm-project/commit/2d975f1efe6cdb4f6303cfe33a3a06cbe02e755a
DIFF: https://github.com/llvm/llvm-project/commit/2d975f1efe6cdb4f6303cfe33a3a06cbe02e755a.diff

LOG: [GlobalISel] Fix std::max after D134380

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
index 9997b1154367..02a12a0337a3 100644
--- a/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/GISelKnownBits.cpp
@@ -39,7 +39,7 @@ Align GISelKnownBits::computeKnownAlignment(Register R, unsigned Depth) {
     return computeKnownAlignment(MI->getOperand(1).getReg(), Depth);
   case TargetOpcode::G_ASSERT_ALIGN: {
     // TODO: Min with source
-    return Align(std::max(1LL, MI->getOperand(2).getImm()));
+    return Align(std::max(int64_t(1), MI->getOperand(2).getImm()));
   }
   case TargetOpcode::G_FRAME_INDEX: {
     int FrameIdx = MI->getOperand(1).getIndex();


        


More information about the llvm-commits mailing list