[llvm] ca1ce39 - BPF: explicitly specify bpfel triple for certain tests

Yonghong Song via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 28 20:25:47 PDT 2020


Author: Yonghong Song
Date: 2020-09-28T20:25:25-07:00
New Revision: ca1ce397acc39f348f4018e446c84a5746fd5e1e

URL: https://github.com/llvm/llvm-project/commit/ca1ce397acc39f348f4018e446c84a5746fd5e1e
DIFF: https://github.com/llvm/llvm-project/commit/ca1ce397acc39f348f4018e446c84a5746fd5e1e.diff

LOG: 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.

Added: 
    

Modified: 
    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

Removed: 
    


################################################################################
diff  --git a/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll b/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll
index b56e1c385e0f..d92776587709 100644
--- a/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll
+++ b/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-1.ll
@@ -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 }
 

diff  --git a/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll b/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll
index 4c709fe2f333..78534fe075ac 100644
--- a/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll
+++ b/llvm/test/CodeGen/BPF/CORE/field-reloc-bitfield-2.ll
@@ -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 }>
 

diff  --git a/llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll b/llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll
index 2dce7336fb0a..239080cbb6bb 100644
--- a/llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll
+++ b/llvm/test/CodeGen/BPF/CORE/intrinsic-fieldinfo-lshift-1.ll
@@ -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 }

diff  --git a/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll b/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
index f48907087e05..3bbea3b897df 100644
--- a/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
+++ b/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-1.ll
@@ -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 }
 

diff  --git a/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll b/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll
index 155bc27bc8f2..e0e58b90bd6f 100644
--- a/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll
+++ b/llvm/test/CodeGen/BPF/CORE/offset-reloc-fieldinfo-2.ll
@@ -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 }
 


        


More information about the llvm-commits mailing list