[RISCV] Improve 64-bit integer constant materialization for more cases.
authorCraig Topper <craig.topper@sifive.com>
Fri, 2 Apr 2021 17:17:54 +0000 (10:17 -0700)
committerCraig Topper <craig.topper@sifive.com>
Fri, 2 Apr 2021 17:18:08 +0000 (10:18 -0700)
commitd7ffa82a8e621ce9a19b98c922adc53d6b7cd9f3
treef6c5490a65edb833f9f8dadd78b666b6053c1046
parentf6790bec5c228476bc844648780a95f999707e3e
[RISCV] Improve 64-bit integer constant materialization for more cases.

For positive constants we try shifting left to remove leading zeros
and fill the bottom bits with 1s. We then materialize that constant
shift it right.

This patch adds a new strategy to try filling the bottom bits with
zeros instead. This catches some additional cases.
llvm/lib/Target/RISCV/MCTargetDesc/RISCVMatInt.cpp
llvm/test/CodeGen/RISCV/calling-conv-half.ll
llvm/test/CodeGen/RISCV/imm.ll
llvm/test/MC/RISCV/rv64i-aliases-valid.s