[RISCV] Peephole optimisation for load/store of global values or constant addresses
authorAlex Bradbury <asb@lowrisc.org>
Mon, 19 Mar 2018 11:54:28 +0000 (11:54 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Mon, 19 Mar 2018 11:54:28 +0000 (11:54 +0000)
commit0171a9f4eca3fe562e94895e618b1312e2134fcf
tree9ba62b86597d893a0e9866122d36802695eae8ed
parentfa0217276a3dd30b745e8306f06c72a91a463ee2
[RISCV] Peephole optimisation for load/store of global values or constant addresses

(load (add base, off), 0) -> (load base, off)
(store val, (add base, off)) -> (store val, base, off)

This is similar to an equivalent peephole optimisation in PPCISelDAGToDAG.

llvm-svn: 327831
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/blockaddress.ll
llvm/test/CodeGen/RISCV/byval.ll
llvm/test/CodeGen/RISCV/fp128.ll
llvm/test/CodeGen/RISCV/inline-asm.ll
llvm/test/CodeGen/RISCV/mem.ll
llvm/test/CodeGen/RISCV/wide-mem.ll