bjope wrote: I wrote https://github.com/llvm/llvm-project/issues/84653 about the problems I've seen with foldBoolSelectToLogic rewriting SELECT into AND without checking isGuaranteedNotToBeUndefOrPoison on the operands. https://github.com/llvm/llvm-project/pull/84232