[llvm] f11f86c - [X86] X86DAGToDAGISel::Select - merge X86::TEST load bitsize checks. NFCI.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Mar 5 08:09:25 PST 2021
Author: Simon Pilgrim
Date: 2021-03-05T15:58:20Z
New Revision: f11f86c114222f46d9193edcf5256eddafa2663a
URL: https://github.com/llvm/llvm-project/commit/f11f86c114222f46d9193edcf5256eddafa2663a
DIFF: https://github.com/llvm/llvm-project/commit/f11f86c114222f46d9193edcf5256eddafa2663a.diff
LOG: [X86] X86DAGToDAGISel::Select - merge X86::TEST load bitsize checks. NFCI.
Added:
Modified:
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index f34d34f8a34c9..3c1e656b53939 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -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;
}
}
More information about the llvm-commits
mailing list