[flang-commits] [flang] 4d69855 - [flang] Silence MSVC warning about shifts (NFC) (#83737)
via flang-commits
flang-commits at lists.llvm.org
Sun Mar 24 03:48:07 PDT 2024
Author: AtariDreams
Date: 2024-03-24T10:48:04Z
New Revision: 4d69855e9d380ecb7c1f7a64c7b37258fe36f525
URL: https://github.com/llvm/llvm-project/commit/4d69855e9d380ecb7c1f7a64c7b37258fe36f525
DIFF: https://github.com/llvm/llvm-project/commit/4d69855e9d380ecb7c1f7a64c7b37258fe36f525.diff
LOG: [flang] Silence MSVC warning about shifts (NFC) (#83737)
Yes, 64-bit shifts are intended.
Added:
Modified:
flang/lib/Optimizer/Builder/IntrinsicCall.cpp
Removed:
################################################################################
diff --git a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
index eb8f5135ff12e0..ea1ef1f08aba20 100644
--- a/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
+++ b/flang/lib/Optimizer/Builder/IntrinsicCall.cpp
@@ -3883,7 +3883,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
int pos = 3 + highSignificandSize;
mlir::Value index = builder.create<mlir::arith::AndIOp>(
loc, builder.create<mlir::arith::ShRUIOp>(loc, intVal, signShift),
- createIntegerConstant(1 << pos));
+ createIntegerConstant(1ULL << pos));
// [e] exponent != 0
mlir::Value exponent =
@@ -3895,7 +3895,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
loc,
builder.create<mlir::arith::CmpIOp>(
loc, mlir::arith::CmpIPredicate::ne, exponent, zero),
- createIntegerConstant(1 << --pos), zero));
+ createIntegerConstant(1ULL << --pos), zero));
// [m] exponent == 1..1 (max exponent)
index = builder.create<mlir::arith::OrIOp>(
@@ -3904,7 +3904,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
loc,
builder.create<mlir::arith::CmpIOp>(
loc, mlir::arith::CmpIPredicate::eq, exponent, exponentMask),
- createIntegerConstant(1 << --pos), zero));
+ createIntegerConstant(1ULL << --pos), zero));
// [l] low-order significand != 0
index = builder.create<mlir::arith::OrIOp>(
@@ -3916,7 +3916,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
builder.create<mlir::arith::AndIOp>(loc, intVal,
lowSignificandMask),
zero),
- createIntegerConstant(1 << --pos), zero));
+ createIntegerConstant(1ULL << --pos), zero));
// [h] high-order significand (1 or 2 bits)
index = builder.create<mlir::arith::OrIOp>(
More information about the flang-commits
mailing list