Instcombine already does this, but this can appear during legalization.
test/CodeGen/Hexagon/expand-vselect-kill.ll completely changes when fixed, and I'm not sure what exactly it was looking for in the first place
The testcase was looking for two conditional assignments, both based on the same predicate register, but with one condition "if-true" and the other "if-false". The original bug was that the "kill" flag on the condition register wasn't cleared on the first assignment and so it was killed before the second conditional assignment (causing a verifier error). I just replaced this testcase with a .mir version, so it's no longer there.