diff --git a/llvm/lib/Target/AVR/AVRISelLowering.cpp b/llvm/lib/Target/AVR/AVRISelLowering.cpp index 1737ec7b67199..07c79f6f227b0 100644 --- a/llvm/lib/Target/AVR/AVRISelLowering.cpp +++ b/llvm/lib/Target/AVR/AVRISelLowering.cpp @@ -412,24 +412,20 @@ SDValue AVRTargetLowering::LowerShifts(SDValue Op, SelectionDAG &DAG) const { } else if (Op.getOpcode() == ISD::ROTL && ShiftAmount == 3) { // Optimize left rotation 3 bits to swap then right rotation 1 bit. Victim = DAG.getNode(AVRISD::SWAP, dl, VT, Victim); - Victim = - DAG.getNode(AVRISD::ROR, dl, VT, Victim, DAG.getConstant(1, dl, VT)); + Victim = DAG.getNode(AVRISD::ROR, dl, VT, Victim); ShiftAmount = 0; } else if (Op.getOpcode() == ISD::ROTR && ShiftAmount == 3) { // Optimize right rotation 3 bits to swap then left rotation 1 bit. Victim = DAG.getNode(AVRISD::SWAP, dl, VT, Victim); - Victim = - DAG.getNode(AVRISD::ROL, dl, VT, Victim, DAG.getConstant(1, dl, VT)); + Victim = DAG.getNode(AVRISD::ROL, dl, VT, Victim); ShiftAmount = 0; } else if (Op.getOpcode() == ISD::ROTL && ShiftAmount == 7) { // Optimize left rotation 7 bits to right rotation 1 bit. - Victim = - DAG.getNode(AVRISD::ROR, dl, VT, Victim, DAG.getConstant(1, dl, VT)); + Victim = DAG.getNode(AVRISD::ROR, dl, VT, Victim); ShiftAmount = 0; } else if (Op.getOpcode() == ISD::ROTR && ShiftAmount == 7) { // Optimize right rotation 7 bits to left rotation 1 bit. - Victim = - DAG.getNode(AVRISD::ROL, dl, VT, Victim, DAG.getConstant(1, dl, VT)); + Victim = DAG.getNode(AVRISD::ROL, dl, VT, Victim); ShiftAmount = 0; } else if ((Op.getOpcode() == ISD::ROTR || Op.getOpcode() == ISD::ROTL) && ShiftAmount >= 4) {