[RISCV][NFC] Clean up RISCVDAGToDAGISel::Select
authorAlex Bradbury <asb@lowrisc.org>
Tue, 21 Nov 2017 12:00:19 +0000 (12:00 +0000)
committerAlex Bradbury <asb@lowrisc.org>
Tue, 21 Nov 2017 12:00:19 +0000 (12:00 +0000)
commit9caefe364af0e60e31d30a0fd45ad1b5616283c0
treed3a5789514741c894c95b6ca19f4f8b5d33eac8f
parent51d82696db3c1c8fe44eafbce5cb578353f9aec3
[RISCV][NFC] Clean up RISCVDAGToDAGISel::Select

As pointed out in post-commit review of r318738, `return ReplaceNode(..)` when
both ReplaceNode and the current function return void is confusing. This patch
moves to using a more obvious early return, and moves to just using an if to
catch the one case we currently care about. A future patch that adds further
custom instruction selection can introduce a switch.

llvm-svn: 318757
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp