[X86] X86DAGToDAGISel::Select - merge X86::TEST load bitsize checks. NFCI.

This commit is contained in:
Simon Pilgrim 2021-03-05 13:55:57 +00:00
parent ed951293af
commit f11f86c114
1 changed files with 3 additions and 5 deletions

View File

@ -5554,11 +5554,9 @@ void X86DAGToDAGISel::Select(SDNode *Node) {
if (auto *LoadN = dyn_cast<LoadSDNode>(N0.getOperand(0).getNode())) {
if (!LoadN->isSimple()) {
unsigned NumVolBits = LoadN->getValueType(0).getSizeInBits();
if (MOpc == X86::TEST8mi && NumVolBits != 8)
break;
else if (MOpc == X86::TEST16mi && NumVolBits != 16)
break;
else if (MOpc == X86::TEST32mi && NumVolBits != 32)
if ((MOpc == X86::TEST8mi && NumVolBits != 8) ||
(MOpc == X86::TEST16mi && NumVolBits != 16) ||
(MOpc == X86::TEST32mi && NumVolBits != 32))
break;
}
}