The patch splits a complex && if condition into easier to read and understand logic.
That wrong early exit condition was letting some instructions with not all operands available pass through when HoistingGeps was true.
The patch also adds an extra early exit for TerminatorInst that should not be added to the analysis in the first place: these are branch instructions, invoke, etc.
I found it strange that we were looking at this kind of instructions when running gdb on the testcase.
I'm testing this patch with 3stage bootstrap and test-suite.
I will commit after it passes, and reenable the pass by default.