We already collect all instructions that need to be promoted. The custom isInstInList() implementation could provide incorrect results if a new use of the original pointer was introduced as part of promotion. This probably cannot happen with normal code, because of the pointer capture, but it can happen with a null pointer. Fixes https://github.com/llvm/llvm-project/issues/59324.
98 KiB
98 KiB