r251085 wasn't as NFC as intended...
From: Mehdi Amini <mehdi.amini@apple.com>
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@251087
91177308-0d34-0410-b5e6-
96231b3b80d8
SmallVector<Value *, 16> OrigLeft, OrigRight;
SmallVector<Value *, 16> OrigLeft, OrigRight;
- bool AllSameOpcodeLeft = true;
- bool AllSameOpcodeRight = true;
-
if (VL.size()) {
// Peel the first iteration out of the loop since there's nothing
// interesting to do anyway and it simplifies the checks
if (VL.size()) {
// Peel the first iteration out of the loop since there's nothing
// interesting to do anyway and it simplifies the checks
Right.push_back(VRight);
}
Right.push_back(VRight);
}
+ // Keep track if we have instructions with all the same opcode on one side.
+ bool AllSameOpcodeLeft = isa<Instruction>(Left[0]);
+ bool AllSameOpcodeRight = isa<Instruction>(Right[0]);
+
for (unsigned i = 1, e = VL.size(); i != e; ++i) {
Instruction *I = cast<Instruction>(VL[i]);
for (unsigned i = 1, e = VL.size(); i != e; ++i) {
Instruction *I = cast<Instruction>(VL[i]);