@@ -412,24 +412,20 @@ SDValue AVRTargetLowering::LowerShifts(SDValue Op, SelectionDAG &DAG) const {
412
412
} else if (Op.getOpcode () == ISD::ROTL && ShiftAmount == 3 ) {
413
413
// Optimize left rotation 3 bits to swap then right rotation 1 bit.
414
414
Victim = DAG.getNode (AVRISD::SWAP, dl, VT, Victim);
415
- Victim =
416
- DAG.getNode (AVRISD::ROR, dl, VT, Victim, DAG.getConstant (1 , dl, VT));
415
+ Victim = DAG.getNode (AVRISD::ROR, dl, VT, Victim);
417
416
ShiftAmount = 0 ;
418
417
} else if (Op.getOpcode () == ISD::ROTR && ShiftAmount == 3 ) {
419
418
// Optimize right rotation 3 bits to swap then left rotation 1 bit.
420
419
Victim = DAG.getNode (AVRISD::SWAP, dl, VT, Victim);
421
- Victim =
422
- DAG.getNode (AVRISD::ROL, dl, VT, Victim, DAG.getConstant (1 , dl, VT));
420
+ Victim = DAG.getNode (AVRISD::ROL, dl, VT, Victim);
423
421
ShiftAmount = 0 ;
424
422
} else if (Op.getOpcode () == ISD::ROTL && ShiftAmount == 7 ) {
425
423
// Optimize left rotation 7 bits to right rotation 1 bit.
426
- Victim =
427
- DAG.getNode (AVRISD::ROR, dl, VT, Victim, DAG.getConstant (1 , dl, VT));
424
+ Victim = DAG.getNode (AVRISD::ROR, dl, VT, Victim);
428
425
ShiftAmount = 0 ;
429
426
} else if (Op.getOpcode () == ISD::ROTR && ShiftAmount == 7 ) {
430
427
// Optimize right rotation 7 bits to left rotation 1 bit.
431
- Victim =
432
- DAG.getNode (AVRISD::ROL, dl, VT, Victim, DAG.getConstant (1 , dl, VT));
428
+ Victim = DAG.getNode (AVRISD::ROL, dl, VT, Victim);
433
429
ShiftAmount = 0 ;
434
430
} else if ((Op.getOpcode () == ISD::ROTR || Op.getOpcode () == ISD::ROTL) &&
435
431
ShiftAmount >= 4 ) {
0 commit comments