[LICM] Bail if checking a global/constant for invariant.start
When we check if a load is loop invariant by finding a dominating invariant.start call, we strip bitcasts until we get to an i8* Value, and look for an invariant.start use of the i8* Value. We may accidentally end up at an i8 global and look at a global's uses, which we shouldn't do in a loop pass. Although we could make this logic work with globals, that's not currently intended. Reviewed By: nikic Differential Revision: https://reviews.llvm.org/D111098
Loading
Please sign in to comment