[RISCV] Remove an unnecessary copy of X0 in selectShiftMask.
authorCraig Topper <craig.topper@sifive.com>
Thu, 30 Jun 2022 22:10:31 +0000 (15:10 -0700)
committerCraig Topper <craig.topper@sifive.com>
Thu, 30 Jun 2022 22:11:58 +0000 (15:11 -0700)
commit5ca39a55a7ea383cdf4a557689af741027b0f3db
treebd001b5829e2cf8e836461f01af763f124dc2f0c
parent373571dbb4b598955e45fd1c3a5557ef70963fd8
[RISCV] Remove an unnecessary copy of X0 in selectShiftMask.

We know which instruction we're emitting so its ok to directly
encode X0 into the instruction. We only need to create a copy when
a constant 0 is selected without context of what instructions uses it.
llvm/lib/Target/RISCV/RISCVISelDAGToDAG.cpp