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

[RISCV] Teach RISCVDAGToDAGISel::selectShiftMask to replace sub from constant with neg.

If the shift amount is (sub C, X) where C is 0 modulo the size of
the shift, we can replace it with neg or negw.

Similar is is done for AArch64 and X86.

Reviewed By: khchen

Differential Revision: https://reviews.llvm.org/D119089
parent 0ed0a8e2
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment