yonghong-song added a comment. I just tested the patch with kernel bpf selftests and it works fine. The patch looks good to me too.
================ Comment at: llvm/lib/Target/BPF/BPFAbstractMemberAccess.cpp:303 CInfo.RecordAlignment = DL->getABITypeAlign(CInfo.Base->getType()->getPointerElementType()); return true; ---------------- nikic wrote: > I noticed too late that this intrinsic also uses the element type to get the > alignment. I'll have to follow up with the same change for this intrinsic. > > Though I'm not completely sure if this is actually used, because no tests > fail if I replace this with dummy values like 1 or 128. This is for llvm.preserve.union.access.index. It is used only if the union member type is a bitfield and we don't have any usecase and test case for that. That is why we didn't hit it. It is okay for now. I probably will change to use getBaseElementType(Call) later by myself. CHANGES SINCE LAST ACTION https://reviews.llvm.org/D106184/new/ https://reviews.llvm.org/D106184 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits