[flang-commits] [flang] 2db0acb - [flang][NFC] Use the constexpr instead of hardcoded -1

Valentin Clement via flang-commits flang-commits at lists.llvm.org
Thu Aug 24 09:40:49 PDT 2023


Author: Valentin Clement
Date: 2023-08-24T09:40:38-07:00
New Revision: 2db0acb2793b22e65f7a5aa3adb0e6c444606212

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

LOG: [flang][NFC] Use the constexpr instead of hardcoded -1

Added: 
    

Modified: 
    flang/lib/Lower/OpenACC.cpp

Removed: 
    


################################################################################
diff  --git a/flang/lib/Lower/OpenACC.cpp b/flang/lib/Lower/OpenACC.cpp
index a0d20c46c3804d..24de69302c8c57 100644
--- a/flang/lib/Lower/OpenACC.cpp
+++ b/flang/lib/Lower/OpenACC.cpp
@@ -1412,11 +1412,10 @@ createLoopOp(Fortran::lower::AbstractConverter &converter,
           tileOperands.push_back(fir::getBase(converter.genExprValue(
               *Fortran::semantics::GetExpr(*expr), stmtCtx)));
         } else {
-          // * was passed as value and will be represented as a -1 constant
-          // integer.
+          // * was passed as value and will be represented as a special
+          // constant.
           mlir::Value tileStar = builder.createIntegerConstant(
-              clauseLocation, builder.getIntegerType(32),
-              /* STAR */ -1);
+              clauseLocation, builder.getIntegerType(32), starCst);
           tileOperands.push_back(tileStar);
         }
       }


        


More information about the flang-commits mailing list