[llvm] 65c3fa8 - [X86][SSE] combineVectorSizedSetCCEquality - move single Subtarget.hasAVX() use into condition. NFC.
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 16 01:42:53 PDT 2020
Author: Simon Pilgrim
Date: 2020-06-16T09:42:33+01:00
New Revision: 65c3fa849b1f5b90485c14c17a406ae5ea0096eb
URL: https://github.com/llvm/llvm-project/commit/65c3fa849b1f5b90485c14c17a406ae5ea0096eb
DIFF: https://github.com/llvm/llvm-project/commit/65c3fa849b1f5b90485c14c17a406ae5ea0096eb.diff
LOG: [X86][SSE] combineVectorSizedSetCCEquality - move single Subtarget.hasAVX() use into condition. NFC.
We already have Subtarget.hasSSE2() and Subtarget.useAVX512Regs() in the condition - seems to be a legacy from when we had multiple uses.
Added:
Modified:
llvm/lib/Target/X86/X86ISelLowering.cpp
Removed:
################################################################################
diff --git a/llvm/lib/Target/X86/X86ISelLowering.cpp b/llvm/lib/Target/X86/X86ISelLowering.cpp
index a94ef142897d..0d73548752d6 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -45819,13 +45819,12 @@ static SDValue combineVectorSizedSetCCEquality(SDNode *SetCC, SelectionDAG &DAG,
EVT VT = SetCC->getValueType(0);
SDLoc DL(SetCC);
- bool HasAVX = Subtarget.hasAVX();
// Use XOR (plus OR) and PTEST after SSE4.1 for 128/256-bit operands.
// Use PCMPNEQ (plus OR) and KORTEST for 512-bit operands.
// Otherwise use PCMPEQ (plus AND) and mask testing.
if ((OpSize == 128 && Subtarget.hasSSE2()) ||
- (OpSize == 256 && HasAVX) ||
+ (OpSize == 256 && Subtarget.hasAVX()) ||
(OpSize == 512 && Subtarget.useAVX512Regs())) {
bool HasPT = Subtarget.hasSSE41();
More information about the llvm-commits
mailing list