[llvm] 8155cb2 - Fold Opcode into assert uses to fix an unused variable warning without asserts.
Eric Christopher via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 11 09:31:35 PDT 2020
Author: Eric Christopher
Date: 2020-08-11T09:30:51-07:00
New Revision: 8155cb27a2327834ae7f0d320dc0e26f108891a8
URL: https://github.com/llvm/llvm-project/commit/8155cb27a2327834ae7f0d320dc0e26f108891a8
DIFF: https://github.com/llvm/llvm-project/commit/8155cb27a2327834ae7f0d320dc0e26f108891a8.diff
LOG: Fold Opcode into assert uses to fix an unused variable warning without asserts.
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 3a2dadb02282..210d04be7c36 100644
--- a/llvm/lib/Target/X86/X86ISelLowering.cpp
+++ b/llvm/lib/Target/X86/X86ISelLowering.cpp
@@ -42207,9 +42207,8 @@ static SDValue combineVectorPack(SDNode *N, SelectionDAG &DAG,
static SDValue combineVectorHADDSUB(SDNode *N, SelectionDAG &DAG,
TargetLowering::DAGCombinerInfo &DCI,
const X86Subtarget &Subtarget) {
- unsigned Opcode = N->getOpcode();
- assert((X86ISD::HADD == Opcode || X86ISD::FHADD == Opcode ||
- X86ISD::HSUB == Opcode || X86ISD::FHSUB == Opcode) &&
+ assert((X86ISD::HADD == N->getOpcode() || X86ISD::FHADD == N->getOpcode() ||
+ X86ISD::HSUB == N->getOpcode() || X86ISD::FHSUB == N->getOpcode()) &&
"Unexpected horizontal add/sub opcode");
// Try to fold HOP(SHUFFLE(),SHUFFLE()) -> SHUFFLE(HOP()).
More information about the llvm-commits
mailing list