[all-commits] [llvm/llvm-project] fe69df: [RISCV] Support Constant Pools in Load/Store Peephole
Sam Elliott via All-commits
all-commits at lists.llvm.org
Mon May 11 10:02:08 PDT 2020
Branch: refs/heads/master
Home: https://github.com/llvm/llvm-project
Commit: fe69dfebcfa007e23bf528fff8b96ac63e593e34
https://github.com/llvm/llvm-project/commit/fe69dfebcfa007e23bf528fff8b96ac63e593e34
Author: Sam Elliott <selliott at lowrisc.org>
Date: 2020-05-11 (Mon, 11 May 2020)
Changed paths:
M llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
M llvm/test/CodeGen/RISCV/calling-conv-ilp32d.ll
M llvm/test/CodeGen/RISCV/calling-conv-ilp32f-ilp32d-common.ll
M llvm/test/CodeGen/RISCV/codemodel-lowering.ll
M llvm/test/CodeGen/RISCV/double-imm.ll
M llvm/test/CodeGen/RISCV/double-previous-failure.ll
M llvm/test/CodeGen/RISCV/float-imm.ll
M llvm/test/CodeGen/RISCV/fp-imm.ll
M llvm/test/CodeGen/RISCV/select-const.ll
Log Message:
-----------
[RISCV] Support Constant Pools in Load/Store Peephole
Summary:
RISC-V uses a post-select peephole pass to optimise
`(load/store (ADDI $reg, %lo(addr)), 0)` into `(load/store $reg, %lo(addr))`.
This peephole wasn't firing for accesses to constant pools, which is how we
materialise most floating point constants.
This adds support for the constantpool case, which improves code generation for
lots of small FP loading examples. I have not added any tests because this
structure is well-covered by the `fp-imm.ll` testcases, as well as almost
all other uses of floating point constants in the RISC-V backend tests.
Reviewed By: luismarques, asb
Differential Revision: https://reviews.llvm.org/D79523
More information about the All-commits
mailing list