[RISCV] Teach RISCVSExtWRemoval to remove sext.w whose upper bits aren't demanded.
SelectionDAG aggressively creates sext_inreg operations after promoting an i32 add. If the add is later matched to a sh1add, sh2add or sh3add, a sext.w from the sext_inreg will get left behind. In many cases we can prove this sext.w is unnecessary by checking if its upper bits are ever used.
parent
a3b4feff
Please register or sign in to comment