bpf: add a test case for trunc-op optimization
authorYonghong Song <yhs@fb.com>
Mon, 20 Nov 2017 21:37:58 +0000 (21:37 +0000)
committerYonghong Song <yhs@fb.com>
Mon, 20 Nov 2017 21:37:58 +0000 (21:37 +0000)
commita4de6d86db7556f27584497f67b34a565eca630a
treeb6333b42774311881ea8f83f96c72424401d2d2d
parent86785bb0bb3afd13cb7b63172c0d546dd4cd2de1
bpf: add a test case for trunc-op optimization

Commit b5cbc7760ab8 ("[bpf] allow direct and indirect calls")
allowed more than one function in the bpf program, and
commit 114353884415 ("bpf: fix a bug in trunc-op optimization")
fixed a bug in trunc-op optimization which only showed up
with more than one function in the bpf program.

This patch added a test case for trunc-op optimization
for bpf programs with two functions. Reverting commit
"bpf: fix a bug in trunc-op optimization" will cause
failure for this test case.

Signed-off-by: Yonghong Song <yhs@fb.com>
llvm-svn: 318695
llvm/test/CodeGen/BPF/remove_truncate_3.ll [new file with mode: 0644]