As detailed here: #148350 (comment)
Since we use IRBuilder in VectorCombine, the result may point to an existing cast instruction instead of CastOp (NewOp). Therefore, it may propagate flags into an incorrect instruction. I recommend using CastInst::Create instead of Builder.CreateCast.
Technically we only need to update the instructions where we're replacing the flags, but probably we want to be consistent at least per-fold if not everywhere.
CC @rhyadav @dtcxzyw