[llvm] r334587 - [SLPVectorizer] getSameOpcode - remove unusued alternate code [NFC]
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 13 03:14:27 PDT 2018
Author: rksimon
Date: Wed Jun 13 03:14:27 2018
New Revision: 334587
URL: http://llvm.org/viewvc/llvm-project?rev=334587&view=rev
Log:
[SLPVectorizer] getSameOpcode - remove unusued alternate code [NFC]
We early-out for the case where we don't use alternate opcodes, so no need to check for it later.
Modified:
llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
Modified: llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp?rev=334587&r1=334586&r2=334587&view=diff
==============================================================================
--- llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp (original)
+++ llvm/trunk/lib/Transforms/Vectorize/SLPVectorizer.cpp Wed Jun 13 03:14:27 2018
@@ -431,11 +431,8 @@ static InstructionsState getSameOpcode(A
for (int Cnt = 0, E = VL.size(); Cnt < E; Cnt++) {
auto *I = cast<Instruction>(VL[Cnt]);
unsigned InstOpcode = I->getOpcode();
- if ((Res.HasAltOpcodes &&
- InstOpcode != (isOdd(Cnt) ? AltOpcode : Opcode)) ||
- (!Res.HasAltOpcodes && InstOpcode != Opcode)) {
+ if (InstOpcode != (isOdd(Cnt) ? AltOpcode : Opcode))
return InstructionsState(OpInst, 0, false);
- }
}
return InstructionsState(OpInst, Opcode, Res.HasAltOpcodes);
}
More information about the llvm-commits
mailing list