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

[RISCV] Teach RISCVMatInt to prefer li+slli over lui+addi(w) for compressibility.

With C extension, li with a 6 bit immediate followed by slli is 4 bytes.
The lui+addi(w) sequence is at least 6 bytes.

The two sequences probably have similar execution latency. The exception
being if the target supports lui+addi(w) macrofusion.

Since the execution latency is probably the same I didn't restrict
this to C extension.

Reviewed By: reames

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