Skip to content
Commit 80b882ec authored by Yonghong Song's avatar Yonghong Song
Browse files

bpf: Don't expand BSWAP on i32, promote it



Currently, there is no ALU32 bswap support in eBPF ISA.

BSWAP on i32 was set to EXPAND which would need about eight instructions
for single BSWAP.

It would be more efficient to promote it to i64, then doing BSWAP on i64.
For eBPF programs, most of the promotion are zero extensions which are
likely be elimiated later by peephole optimizations.

Signed-off-by: default avatarJiong Wang <jiong.wang@netronome.com>
Signed-off-by: default avatarYonghong Song <yhs@fb.com>
llvm-svn: 327369
parent 1d28a759
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment