https://github.com/lhutton1 commented: Apologies for missing it previously - I wondered if the `pad_const` value also needs to be checked before folding? Does it only make sense to fold when `pad_const=0`? https://github.com/llvm/llvm-project/pull/132700