[clang] [CIR] Emit inbounds/inrange for vtable address points in initializers (PR #227520)
Bruno Cardoso Lopes via cfe-commits
cfe-commits at lists.llvm.org
Tue Sep 29 18:53:40 PDT 2026
================
@@ -32,7 +32,7 @@ int *constArrAddr = &arr[2][1];
// The 'inbounds' and 'nuw' flags are inferred by LLVM's constant folder. The
// same flags show up at -O1 in OGCG.
-// LLVM: @constArrAddr = global ptr getelementptr inbounds nuw (i8, ptr @arr, i64 132), align 8
+// LLVM: @constArrAddr = global ptr getelementptr (i8, ptr @arr, i64 132), align 8
----------------
bcardosolopes wrote:
I think I submitted this PR right before you did? My PR fixes (a) the regressions (I thought that was clear in the description) and while there (b) takes the opportunity to make the vtable emission to match classic, instead of just making the tests pass.
I'm fine either way, I'll rebase after you land yours and fix the vtable stuff then. Not sure what you mean by https://github.com/llvm/llvm-project/pull/226534.
https://github.com/llvm/llvm-project/pull/227520
More information about the cfe-commits
mailing list