Skip to content

Commit 8cbac1a

Browse files
Tommy McMichenbcardosolopes
authored andcommitted
[CIR][NFC] Remove extra curly braces from test
1 parent daac47d commit 8cbac1a

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

clang/lib/CIR/Lowering/DirectToLLVM/LowerToLLVM.cpp

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1053,17 +1053,16 @@ static mlir::Value promoteIndex(mlir::ConversionPatternRewriter &rewriter,
10531053
// If the index definition is a unary minus (index = sub 0, x), then we need
10541054
// to
10551055
bool rewriteSub = false;
1056-
auto sub = mlir::dyn_cast<mlir::LLVM::SubOp>(indexOp);
1057-
if (sub) {
1056+
auto sub = dyn_cast<mlir::LLVM::SubOp>(indexOp);
1057+
if (sub)
10581058
if (auto lhsConst =
10591059
sub.getOperand(0).getDefiningOp<mlir::LLVM::ConstantOp>()) {
1060-
auto lhsConstInt = mlir::dyn_cast<mlir::IntegerAttr>(lhsConst.getValue());
1060+
auto lhsConstInt = dyn_cast<mlir::IntegerAttr>(lhsConst.getValue());
10611061
if (lhsConstInt && lhsConstInt.getValue() == 0) {
10621062
rewriteSub = true;
10631063
index = sub.getOperand(1);
10641064
}
10651065
}
1066-
}
10671066

10681067
// Handle the cast
10691068
auto llvmDstType = mlir::IntegerType::get(rewriter.getContext(), layoutWidth);

0 commit comments

Comments
 (0)