This commit fixes an error in the RemoveDeadValues pass that is
associated with its incorrect usage of the cloneInto() function.
The setOperands() function that is used by the cloneInto() function
requires all operands to not be null. But, that is not possible in this
pass because we drop uses of dead values, thus making them null. It is
only at the end of the pass that we are assured that such null values
won't exist but during the execution of the pass, there could be null
To fix this, we replace the usage of the cloneInto() function to copy
a region with moveBlock() to move each block of the region one by one.
This function does not require the presence of non-null values and is
thus the right choice here. This implementation is also more opttimized
because we are moving things instead of copying them. The goal was
Signed-off-by: Srishti Srivastava <firstname.lastname@example.org>