Michael-Chen-NJU wrote: This also fixes #200742, which I was working on. The test case there uses or i32 %x, -1 (which folds to -1) with a store to a null pointer, triggering the same assertion failure. https://github.com/llvm/llvm-project/pull/201023