topperc wrote: > Also you'll want to do this inside SimplifyDemanded to reuse existing KnownBits information. Do we do that for other flags already? I based this off Add/Sub. https://github.com/llvm/llvm-project/pull/72912