Skip to content

Commit 67e19e5

Browse files
committed
[flang] Set isSigned=true for negative constant (NFC)
We're providing this as a negative signed value, so set the flag. Currently doesn't make a difference, but will assert in the future. Split out of #80309.
1 parent 7d1a681 commit 67e19e5

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

flang/lib/Optimizer/CodeGen/CodeGen.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1262,7 +1262,7 @@ struct EmboxCommonConversion : public fir::FIROpConversion<OP> {
12621262
} else {
12631263
auto maskAttr = mlir::IntegerAttr::get(
12641264
rewriter.getIntegerType(8, /*isSigned=*/false),
1265-
llvm::APInt(8, (uint64_t)~_CFI_ADDENDUM_FLAG, /*isSigned=*/false));
1265+
llvm::APInt(8, (uint64_t)~_CFI_ADDENDUM_FLAG, /*isSigned=*/true));
12661266
mlir::LLVM::ConstantOp mask = rewriter.create<mlir::LLVM::ConstantOp>(
12671267
loc, rewriter.getI8Type(), maskAttr);
12681268
extraField = rewriter.create<mlir::LLVM::AndOp>(loc, extraField, mask);

0 commit comments

Comments
 (0)