This should fix https://github.com/rust-lang/rust/issues/107681.
Return undefined to a noundef return value is undefined.
Example:
define noundef i32 @test_ret_noundef(i1 %cond) { entry: br i1 %cond, label %bb1, label %bb2 bb1: br label %bb2 bb2: %r = phi i32 [ undef, %entry ], [ 1, %bb1 ] ret i32 %r }
As a side note, I'm pretty sure this was supposed to read !GEP->isInBounds() && !GEP->hasAllZeroIndices(), the current check doesn't make a lot of sense.