[GlobalOpt] Handle non-instruction MTI source (PR54572)
This was reusing a cast to GlobalVariable to check for an Instruction, which means we'll try to dereference a null pointer if it's not actually a GlobalVariable. We should be casting MTI->getSource() instead. I don't think this problem is really specific to opaque pointers, but it certainly makes it a lot easier to reproduce. Fixes https://github.com/llvm/llvm-project/issues/54572.
Loading
Please register or sign in to comment