Skip to content

Commit 007073f

Browse files
committed
Fix printing signed switch op values
Fixes bug where signed switch op values were printed as unsigned values
1 parent a77f9c9 commit 007073f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/lib/Dialect/LLVMIR/IR/LLVMDialect.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -635,7 +635,7 @@ static void printSwitchOpCases(OpAsmPrinter &p, SwitchOp op, Type flagType,
635635
llvm::zip(caseValues, caseDestinations),
636636
[&](auto i) {
637637
p << " ";
638-
p << std::get<0>(i).getLimitedValue();
638+
p << std::get<0>(i).getSExtValue();
639639
p << ": ";
640640
p.printSuccessorAndUseList(std::get<1>(i), caseOperands[index++]);
641641
},

0 commit comments

Comments
 (0)