[InstSimplify] Don't assume parent function when simplifying llvm.vscale.
D106850 introduced a simplification for llvm.vscale by looking at the surrounding function's vscale_range attributes. The call that's being simplified may not yet have been inserted into the IR. This happens for example during function cloning. This patch fixes the issue by checking if the instruction is in a parent basic block.
Loading
Please register or sign in to comment