topperc wrote: I just realized the ConstantAggregateZero part of this is dead code due to an earlier check for ConstantAggregateZero. I'll just refactor this to handle undef earlier and remove the scalable check. https://github.com/llvm/llvm-project/pull/143586