RKSimon wrote: SelectionDAG::canCreateUndefOrPoison checks for hasPoisonGeneratingFlags - which seems to cover nonans/noinfs - but we'd definitely need to have test coverage for this. https://github.com/llvm/llvm-project/pull/142250