This verifies:
define ptr @src_alloca(i64 %x) {
%p = alloca [128 x i8]
%gep = getelementptr i8, ptr %p, i64 %x
ret ptr %gep
}
define ptr @tgt_alloca(i64 %x) {
%p = alloca [128 x i8]
%gep = getelementptr nuw i8, ptr %p, i64 %x
ret ptr %gep
}
The equivalent code with a global does correctly require inbounds on the original GEP.
https://alive2.llvm.org/ce/z/C6amHn
This verifies:
The equivalent code with a global does correctly require inbounds on the original GEP.
https://alive2.llvm.org/ce/z/C6amHn