[BPF] Don't fetch alignment of llvm.preserve.union.access.index argument
authorNikita Popov <npopov@redhat.com>
Thu, 24 Mar 2022 10:24:40 +0000 (11:24 +0100)
committerNikita Popov <npopov@redhat.com>
Fri, 25 Mar 2022 08:53:30 +0000 (09:53 +0100)
commitc48b4641c7baf9f7280d352c13299b3aa0203179
tree4cf61214f292d9c87f709a46247a0d08cc02fe7a
parent6daa206b5d605e90b7e219d4efa0809f2ca2d29d
[BPF] Don't fetch alignment of llvm.preserve.union.access.index argument

The way the alignment is determined here is not compatible with
opaque pointers -- we'd have to thread it through using either
align or elementtype attributes.

However, as far as I can tell this alignment is actually never
used for this particular intrinsic, so I've dropped the assignment
entirely and converted RecordAlignment to MaybeAlign, so we get an
assertion failure if it does end up being used.

Differential Revision: https://reviews.llvm.org/D122379
llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp