This patch:
- Extends the preprocessing of constant aggregates for undefs. Such operands are replaced with a call to llvm.spv.const.composite.
- Adds a test undef-composite-store.ll demonstrating the issue.
- Adjusts and fixes formatting of two other tests.
More about this patch can be found here.
this dyn_cast to constant doesn't make much sense to me, either you don't need this second cast or you should dyn_cast to UndefValue?