Skip to content

Commit 3ad8b9a

Browse files
committed
fixup! Use switch
1 parent 5abee2b commit 3ad8b9a

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

llvm/lib/CodeGen/SelectionDAG/SelectionDAG.cpp

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4399,12 +4399,17 @@ KnownBits SelectionDAG::computeKnownBits(SDValue Op, const APInt &DemandedElts,
43994399
Known = KnownScalarMemory.sext(BitWidth);
44004400
break;
44014401
case ISD::EXTLOAD:
4402-
if (TLI->getExtendForAtomicOps() == ISD::ZERO_EXTEND)
4402+
switch (TLI->getExtendForAtomicOps()) {
4403+
case ISD::ZERO_EXTEND:
44034404
Known = KnownScalarMemory.zext(BitWidth);
4404-
else if (TLI->getExtendForAtomicOps() == ISD::SIGN_EXTEND)
4405+
break;
4406+
case ISD::SIGN_EXTEND:
44054407
Known = KnownScalarMemory.sext(BitWidth);
4406-
else
4408+
break;
4409+
default:
44074410
Known = KnownScalarMemory.anyext(BitWidth);
4411+
break;
4412+
}
44084413
break;
44094414
case ISD::NON_EXTLOAD:
44104415
Known = KnownScalarMemory;

0 commit comments

Comments
 (0)