Hi, I noticed that the semantics of llvm.type.checked.load.relative
seem to be a little different from that of llvm.load.relative
. It looks like the semantics for llvm.type.checked.load.relative
is ptr + offset + *(ptr + offset)
whereas the semantics for llvm.load.relative
is ptr + *(ptr + offset)
. That is, the offset for the former is added to the offset address whereas the later has the offset added to the original pointer. Is this intentional?
Asking because it really feels like the checked intrinsic was meant to match the semantics of the non-checked intrinsic, but I think for all cases the checked intrinsic is used (swift being the only use I know of), the calculation just happens to be the same because swift always uses an offset of zero. Likewise, all llvm tests for this intrinsic happen to use an offset of zero.
I will be posting a change to the semantics in upstream LLVM for llvm.type.checked.load.relative
to match llvm.load.relative
, but wanted to make sure this potentially wouldn't break any swift users who I think were the folks who introduced this checked intrinsic.