
Similar to 806761a7629df268c8aed49657aeccffa6bca449 -mtriple= specifies the full target triple while -march= merely sets the architecture part of the default target triple (e.g. Windows, macOS), leaving a target triple which may not make sense. Therefore, -march= is error-prone and not recommended for tests without a target triple. The issue has been benign as we recognize bpf*-apple-darwin as ELF instead of rejecting it outrightly.
23 lines
606 B
LLVM
23 lines
606 B
LLVM
; RUN: llc -mtriple=bpfel -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
|
|
; RUN: llc -mtriple=bpfeb -filetype=asm -o - %s | FileCheck -check-prefixes=CHECK %s
|
|
|
|
; Source code:
|
|
; int test(int arg) { return arg; }
|
|
; Compilation flag:
|
|
; clang -target bpf -O2 -S -emit-llvm t.c
|
|
|
|
; Function Attrs: norecurse nounwind readnone
|
|
define dso_local i32 @test(i32 returned) local_unnamed_addr #0 {
|
|
ret i32 %0
|
|
}
|
|
|
|
; CHECK-NOT: BTF
|
|
|
|
attributes #0 = { norecurse nounwind readnone }
|
|
|
|
!llvm.module.flags = !{!0}
|
|
!llvm.ident = !{!1}
|
|
|
|
!0 = !{i32 1, !"wchar_size", i32 4}
|
|
!1 = !{!"clang version 8.0.20181009 "}
|