3 Commits

Author SHA1 Message Date
Nikita Popov
6022873372 [BPF] Convert some tests to opaque pointers (NFC) 2022-12-19 12:46:54 +01:00
Simon Pilgrim
01631a83f1 [BPF] memcmp.ll - add checks for all loads
Noticed while triaging alignment issues for #57872
2022-09-24 18:55:25 +01:00
Yonghong Song
5898979387 BPF: support inlining __builtin_memcmp intrinsic call
Delyan Kratunov reported an issue where __builtin_memcmp is
not inlined into simple load/compare instructions.
This is a known issue. In the current state, __builtin_memcmp
will be converted to memcmp call which won't work for
bpf programs.

This patch added support for expanding __builtin_memcmp with
actual loads and compares up to currently maximum 128 total loads.
The implementation is identical to PowerPC.

Differential Revision: https://reviews.llvm.org/D122676
2022-03-29 15:03:26 -07:00