In linux kernel commit [1], we have a bpf selftest failure caused by
llvm. In this particular case, the BPFCheckAndAdjustIR pass has a
function insertASpaceCasts() which inserts proper addrspacecast insn
at proper IR places. It does not handle __builtin_memset() and hance
caused selftest failure.
Add support in insertASpaceCasts() to handle
__builtin_(memset,memcpy,memmove,memset_inline,memcpy_inline}()
properly and this can fix the issue in [1] as well.
[1]
https://lore.kernel.org/all/20250920045805.3288551-1-yonghong.song@linux.dev/