Skip to content

Commit c224000

Browse files
committed
[flang] Silence MSVC warning about shifts (NFC)
Yes, 64-bit shifts are intended.
1 parent 0c90e88 commit c224000

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

flang/lib/Optimizer/Builder/IntrinsicCall.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3812,7 +3812,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
38123812
int pos = 3 + highSignificandSize;
38133813
mlir::Value index = builder.create<mlir::arith::AndIOp>(
38143814
loc, builder.create<mlir::arith::ShRUIOp>(loc, intVal, signShift),
3815-
createIntegerConstant(1 << pos));
3815+
createIntegerConstant(1ULL << pos));
38163816

38173817
// [e] exponent != 0
38183818
mlir::Value exponent =
@@ -3824,7 +3824,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
38243824
loc,
38253825
builder.create<mlir::arith::CmpIOp>(
38263826
loc, mlir::arith::CmpIPredicate::ne, exponent, zero),
3827-
createIntegerConstant(1 << --pos), zero));
3827+
createIntegerConstant(1ULL << --pos), zero));
38283828

38293829
// [m] exponent == 1..1 (max exponent)
38303830
index = builder.create<mlir::arith::OrIOp>(
@@ -3833,7 +3833,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
38333833
loc,
38343834
builder.create<mlir::arith::CmpIOp>(
38353835
loc, mlir::arith::CmpIPredicate::eq, exponent, exponentMask),
3836-
createIntegerConstant(1 << --pos), zero));
3836+
createIntegerConstant(1ULL << --pos), zero));
38373837

38383838
// [l] low-order significand != 0
38393839
index = builder.create<mlir::arith::OrIOp>(
@@ -3845,7 +3845,7 @@ mlir::Value IntrinsicLibrary::genIeeeClass(mlir::Type resultType,
38453845
builder.create<mlir::arith::AndIOp>(loc, intVal,
38463846
lowSignificandMask),
38473847
zero),
3848-
createIntegerConstant(1 << --pos), zero));
3848+
createIntegerConstant(1ULL << --pos), zero));
38493849

38503850
// [h] high-order significand (1 or 2 bits)
38513851
index = builder.create<mlir::arith::OrIOp>(

0 commit comments

Comments
 (0)