[RISCV] Refactor the common combines for SELECT_CC and BR_CC into a helper function.
authorCraig Topper <craig.topper@sifive.com>
Thu, 21 Jul 2022 04:07:07 +0000 (21:07 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 21 Jul 2022 04:18:07 +0000 (21:18 -0700)
commit7dda6c71b1a12a49adb488b8f4ea2da54072099f
tree4eb3b5d5029cf8908abe22e6cae193cc1afa24a7
parentbba1f26f2ec945f48f75e465a52e4b3cc43344ea
[RISCV] Refactor the common combines for SELECT_CC and BR_CC into a helper function.

The only difference between the combines were the calls to getNode
that include the true/false values for SELECT_CC or the chain
and branch target for BR_CC.

Wrap the rest of the code into a helper that reads LHS, RHS, and
CC and outputs new values and a bool if a new node needs to be
created.
llvm/lib/Target/RISCV/RISCVISelLowering.cpp