1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-23 19:23:23 +01:00

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.
This commit is contained in:
Yonghong Song 2020-09-28 20:15:05 -07:00
parent 09394476cd
commit 7ba626add6
5 changed files with 9 additions and 9 deletions

View File

@ -18,9 +18,9 @@
; __builtin_preserve_field_info(arg->bf2, FIELD_TYPE_LSHIFT_U64);
; }
; Compilation flag:
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
target triple = "bpf"
target triple = "bpfel"
%struct.s = type { i64, i32, i32, i32, i8, i8 }

View File

@ -19,9 +19,9 @@
; bf1, bf1, bf3 and bf4 and the ABI alignment is 1 byte. So for bf4 access,
; the starting offset has to be at the beginning of field bf3.
; Compilation flag:
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
target triple = "bpf"
target triple = "bpfel"
%struct.s = type <{ i8, i16 }>

View File

@ -15,9 +15,9 @@
; return r1 + r2 + r3 + r4;
; }
; Compilation flag:
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
target triple = "bpf"
target triple = "bpfel"
%union.u1 = type { i32 }
%struct.s1 = type { i32 }

View File

@ -35,7 +35,7 @@
; Compilation flag:
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
target triple = "bpf"
target triple = "bpfel"
%struct.s = type { i32, i16 }

View File

@ -35,9 +35,9 @@
; return ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
; }
; Compilation flag:
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
target triple = "bpf"
target triple = "bpfel"
%struct.s = type { i32, i16 }