https://github.com/andykaylor commented: This really feels like an optimization that has no business happening in codegen. @bcardosolopes , @erichkeane What do you think? https://github.com/llvm/llvm-project/pull/161232