[all-commits] [llvm/llvm-project] 589897: BPF: support inlining __builtin_memcmp intrinsic call
yonghong-song via All-commits
all-commits at lists.llvm.org
Tue Mar 29 15:04:16 PDT 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 5898979387bc4b0a6cddbeacac4a06c1d54933a9
https://github.com/llvm/llvm-project/commit/5898979387bc4b0a6cddbeacac4a06c1d54933a9
Author: Yonghong Song <yhs at fb.com>
Date: 2022-03-29 (Tue, 29 Mar 2022)
Changed paths:
M llvm/lib/Target/BPF/BPFISelLowering.cpp
M llvm/lib/Target/BPF/BPFTargetTransformInfo.h
A llvm/test/CodeGen/BPF/memcmp.ll
Log Message:
-----------
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
More information about the All-commits
mailing list