[llvm] [Loads] Only allow replacement with derefable constant global (PR #217350)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Aug 20 05:30:59 PDT 2026
nikic wrote:
> IIRC `vtable assumptions` means something like this? https://godbolt.org/z/PMbY45x77
Clang also directly emits assumes under `-fstrict-vtable-pointers`: https://github.com/llvm/llvm-project/blob/c0125a7bf833b6cf0d5b4a085b63094e0893c85a/clang/lib/CodeGen/CGClass.cpp#L2521
I think they might still work even if we don't allow replacement because SCCP should still be capable to constant folding loads based on the equality. But at least we have some affected GVN tests. We probably don't have good end-to-end optimization coverage for this mode.
https://github.com/llvm/llvm-project/pull/217350
More information about the llvm-commits
mailing list