[RISCV] Change how we isel (add X, [-4096, -2049]) or (add X, [2048,4095]).
We currently split the immediate almost equally between two addis. If the immediate is odd, it won't be split exactly equal. This patch instead gives one addi an immediate of 2047 or -2048 and the other getsthe remainder. If the original immediate is near -2049 or 2048, this might allow the use of c.addi for the addi that receives the smaller immediate. Reviewed By: asb, luismarques Differential Revision: https://reviews.llvm.org/D128500
Loading
Please sign in to comment