@@ -1933,10 +1933,8 @@ void VPWidenSelectRecipe::execute(VPTransformState &State) {
1933
1933
// loop. This means that we can't just use the original 'cond' value.
1934
1934
// We have to take the 'vectorized' value and pick the first lane.
1935
1935
// Instcombine will make this a no-op.
1936
- auto *InvarCond =
1937
- isInvariantCond () ? State.get (getCond (), VPLane (0 )) : nullptr ;
1936
+ Value *Cond = State.get (getCond (), isInvariantCond ());
1938
1937
1939
- Value *Cond = InvarCond ? InvarCond : State.get (getCond ());
1940
1938
Value *Op0 = State.get (getOperand (1 ));
1941
1939
Value *Op1 = State.get (getOperand (2 ));
1942
1940
Value *Sel = State.Builder .CreateSelect (Cond, Op0, Op1);
@@ -2495,18 +2493,14 @@ void VPWidenGEPRecipe::execute(VPTransformState &State) {
2495
2493
// produce a vector of pointers unless VF is scalar.
2496
2494
// The pointer operand of the new GEP. If it's loop-invariant, we
2497
2495
// won't broadcast it.
2498
- auto *Ptr = isPointerLoopInvariant () ? State.get (getOperand (0 ), VPLane (0 ))
2499
- : State.get (getOperand (0 ));
2496
+ auto *Ptr = State.get (getOperand (0 ), isPointerLoopInvariant ());
2500
2497
2501
2498
// Collect all the indices for the new GEP. If any index is
2502
2499
// loop-invariant, we won't broadcast it.
2503
2500
SmallVector<Value *, 4 > Indices;
2504
2501
for (unsigned I = 1 , E = getNumOperands (); I < E; I++) {
2505
2502
VPValue *Operand = getOperand (I);
2506
- if (isIndexLoopInvariant (I - 1 ))
2507
- Indices.push_back (State.get (Operand, VPLane (0 )));
2508
- else
2509
- Indices.push_back (State.get (Operand));
2503
+ Indices.push_back (State.get (Operand, isIndexLoopInvariant (I - 1 )));
2510
2504
}
2511
2505
2512
2506
// Create the new GEP. Note that this GEP may be a scalar if VF == 1,
0 commit comments