[RISCV] Fix a mistake in PostprocessISelDAG
authorHaocong.Lu <Haocong.Lu@streamcomputing.com>
Fri, 25 Feb 2022 12:37:07 +0000 (12:37 +0000)
committerBen Shi <ben.shi@streamcomputing.com>
Fri, 25 Feb 2022 12:38:31 +0000 (12:38 +0000)
commit865fe131f87c68e27f64a1fe6f6351b6a6952cca
tree10b0487ad97279a2a0de44ffb1b25905ad702fbe
parentb7fba5325eabb05feac6ec78eed3c1b88e4f03f4
[RISCV] Fix a mistake in PostprocessISelDAG

With the condition N->use_empty(), the root node of DAG always
misses peephole optimization. So a dummy node is needed.

Reviewed By: craig.topper

Differential Revision: https://reviews.llvm.org/D119934
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp
llvm/test/CodeGen/RISCV/fold-addi-loadstore.ll