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

[RISCV] Improve lowering of SHL_PARTS/SRL_PARTS/SRA_PARTS.

Part of the shift lowering creates a (sub XLEN-1, ShAmt). When this
value is used we know that ShAmt is [0..XLEN-1]. Since XLEN is a power
of 2 we can replace the sub with an xor. This allows us to use XORI
instead of LI+SUB.

Reviewed By: asb

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