Skip to content
Commit 992bee04 authored by Craig Topper's avatar Craig Topper
Browse files

[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
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment