Skip to content

Commit 67a0d7f

Browse files
committed
Remove brackets from switch cases
1 parent 1c5ef7a commit 67a0d7f

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

llvm/lib/Target/NVPTX/NVPTXISelDAGToDAG.cpp

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -191,13 +191,13 @@ void NVPTXDAGToDAGISel::Select(SDNode *N) {
191191
return;
192192
}
193193
break;
194+
}
194195
case ISD::FADD:
195196
case ISD::FMUL:
196197
case ISD::FSUB:
197198
if (tryBF16ArithToFMA(N))
198199
return;
199200
break;
200-
}
201201
default:
202202
break;
203203
}
@@ -2491,22 +2491,19 @@ bool NVPTXDAGToDAGISel::tryBF16ArithToFMA(SDNode *N) {
24912491
};
24922492

24932493
switch (N->getOpcode()) {
2494-
case ISD::FADD: {
2494+
case ISD::FADD:
24952495
// add(a, b) -> fma(a, 1.0, b)
24962496
Operands = {N0, GetConstant(1.0), N1};
24972497
break;
2498-
}
2499-
case ISD::FSUB: {
2498+
case ISD::FSUB:
25002499
// sub(a, b) -> fma(b, -1.0, a)
25012500
Operands = {N1, GetConstant(-1.0), N0};
25022501
break;
2503-
}
2504-
case ISD::FMUL: {
2502+
case ISD::FMUL:
25052503
// mul(a, b) -> fma(a, b, -0.0)
25062504
// NOTE: The identity is -0, not 0, because -0 + 0 == 0 for floats
25072505
Operands = {N0, N1, GetConstant(-0.0)};
25082506
break;
2509-
}
25102507
default:
25112508
llvm_unreachable("Unexpected opcode");
25122509
};

0 commit comments

Comments
 (0)