[RISCV] Expand i32 abs to negw+max at isel.
This adds a RISCVISD::ABSW to remember that we started with an i32 abs. Previously we used a DAG combine of (sext_inreg (abs)) to delay emitting a freeze from type legalization in order to make ComputeNumSignBits optimizations work on other promoted nodes. This new approach always uses negw+max even if the result doesn't need to be sign extended. This helps the RISCVSExtWRemoval pass if the sext.w is in another basic block.
parent
17737437
Please register or sign in to comment