Currently canonicalizations of a store and a cast try to fold all casts into the store.
In the case where the operand being stored is itself a cast, this is illegal as the type of the value being stored
will change. This PR fixes this by not checking the value for folding with a cast.
Depends on https://reviews.llvm.org/D103828
Could also use make_filter_range instead:
for (OpOperand &operand : make_filter_range(op->getOpOperands(), [] (OpOperand &operand) { return operand.get() != ignore; })) {