BPF: explicitly specify bpfel triple for certain tests
authorYonghong Song <yhs@fb.com>
Tue, 29 Sep 2020 03:15:05 +0000 (20:15 -0700)
committerYonghong Song <yhs@fb.com>
Tue, 29 Sep 2020 03:25:25 +0000 (20:25 -0700)
commitca1ce397acc39f348f4018e446c84a5746fd5e1e
tree525e853a69aece90a6a47e8d52be60b2e59effad
parent5a3023a91c0ec82e7272569c5ca7a6eb372b129f
BPF: explicitly specify bpfel triple for certain tests

Commit 54d9f743c8b0 ("BPF: move AbstractMemberAccess and
PreserveDIType passes to EP_EarlyAsPossible") changed most
of CORE tests with opt run followed by llc and opt requires
the target triple specified in the IR.

There are few tests where little endian and big endian will
report different result and for little endian versions of
tests, "target triple = "bpf"" will produce wrong results
if the test executed in a big endian machine, e.g.
PowerPC big endian machine, since target "bpf" represents
host endian and will resolve to "bpfeb".
The builtbot reported such failures when build-and-run
on a PowerPC big endian machine.

To fix the issue, using "target triple = "bpfel"" instead.
llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll
llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll
llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll
llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll