[llvm] [Mips] In LowerShift*Parts, xor with bits-1 instead of -1. (PR #71149)
Simon Pilgrim via llvm-commits
llvm-commits at lists.llvm.org
Fri Nov 3 01:50:53 PDT 2023
================
@@ -2593,12 +2593,13 @@ SDValue MipsTargetLowering::lowerShiftLeftParts(SDValue Op,
SDValue Shamt = Op.getOperand(2);
// if shamt < (VT.bits):
// lo = (shl lo, shamt)
- // hi = (or (shl hi, shamt) (srl (srl lo, 1), ~shamt))
+ // hi = (or (shl hi, shamt) (srl (srl lo, 1), (VT.bits-1) ^ shamt))
----------------
RKSimon wrote:
consistent style: (xor (VT.bits-1), shamt)
https://github.com/llvm/llvm-project/pull/71149
More information about the llvm-commits
mailing list