Skip to content

Commit ca1ce39

Browse files
committed
BPF: explicitly specify bpfel triple for certain tests
Commit 54d9f74 ("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.
1 parent 5a3023a commit ca1ce39

File tree

5 files changed

+9
-9
lines changed

5 files changed

+9
-9
lines changed

llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,9 @@
1818
; __builtin_preserve_field_info(arg->bf2, FIELD_TYPE_LSHIFT_U64);
1919
; }
2020
; Compilation flag:
21-
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
21+
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
2222

23-
target triple = "bpf"
23+
target triple = "bpfel"
2424

2525
%struct.s = type { i64, i32, i32, i32, i8, i8 }
2626

llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@
1919
; bf1, bf1, bf3 and bf4 and the ABI alignment is 1 byte. So for bf4 access,
2020
; the starting offset has to be at the beginning of field bf3.
2121
; Compilation flag:
22-
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
22+
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
2323

24-
target triple = "bpf"
24+
target triple = "bpfel"
2525

2626
%struct.s = type <{ i8, i16 }>
2727

llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,9 +15,9 @@
1515
; return r1 + r2 + r3 + r4;
1616
; }
1717
; Compilation flag:
18-
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
18+
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
1919

20-
target triple = "bpf"
20+
target triple = "bpfel"
2121

2222
%union.u1 = type { i32 }
2323
%struct.s1 = type { i32 }

llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
; Compilation flag:
3636
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
3737

38-
target triple = "bpf"
38+
target triple = "bpfel"
3939

4040
%struct.s = type { i32, i16 }
4141

llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,9 +35,9 @@
3535
; return ull >> __builtin_preserve_field_info(arg->b2, FIELD_RSHIFT_U64);
3636
; }
3737
; Compilation flag:
38-
; clang -target bpf -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
38+
; clang -target bpfel -O2 -g -S -emit-llvm -Xclang -disable-llvm-passes test.c
3939

40-
target triple = "bpf"
40+
target triple = "bpfel"
4141

4242
%struct.s = type { i32, i16 }
4343

0 commit comments

Comments
 (0)