[llvm] [Verifier] Make sure all constexprs in instructions are visited (PR #171643)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Wed Dec 10 08:50:23 PST 2025
================
@@ -51,6 +51,20 @@
@g = global i32 ptrtoaddr (ptr @g to i32)
; DST_NOT_ADDR_SIZE-NEXT: PtrToAddr result must be address width
; DST_NOT_ADDR_SIZE-NEXT: i32 ptrtoaddr (ptr @g to i32)
- at g_vec = global <4 x i32> ptrtoaddr (<4 x ptr> <ptr @g, ptr @g, ptr @g, ptr @g> to <4 x i32>)
-; TODO: Verifier.cpp does not visit ConstantVector/ConstantStruct values
----------------
nikic wrote:
This TODO was inaccurate, in that it did get visited inside globals (but not instructions). The reason no error was reported is that the ptrtoaddr gets splatted and then is the same as in the other global, and the duplicate message is suppressed. I've changed this to use a different global to get the message to print.
https://github.com/llvm/llvm-project/pull/171643
More information about the llvm-commits
mailing list