Similar to 806761a762
-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
934 B
LLVM
23 lines
934 B
LLVM
; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py UTC_ARGS: --version 4
|
|
; RUN: llc -mtriple=bpfel -mcpu=v4 -filetype=asm -show-mc-encoding < %s | FileCheck %s
|
|
|
|
define ptr addrspace(1) @foo(ptr %p) {
|
|
; CHECK-LABEL: foo:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: r0 = addr_space_cast(r1, 1, 0) # encoding: [0xbf,0x10,0x01,0x00,0x00,0x00,0x01,0x00]
|
|
; CHECK-NEXT: exit # encoding: [0x95,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
|
|
entry:
|
|
%0 = addrspacecast ptr %p to ptr addrspace(1)
|
|
ret ptr addrspace(1) %0
|
|
}
|
|
|
|
define ptr @bar(ptr addrspace(1) %p) {
|
|
; CHECK-LABEL: bar:
|
|
; CHECK: # %bb.0: # %entry
|
|
; CHECK-NEXT: r0 = addr_space_cast(r1, 0, 1) # encoding: [0xbf,0x10,0x01,0x00,0x01,0x00,0x00,0x00]
|
|
; CHECK-NEXT: exit # encoding: [0x95,0x00,0x00,0x00,0x00,0x00,0x00,0x00]
|
|
entry:
|
|
%0 = addrspacecast ptr addrspace(1) %p to ptr
|
|
ret ptr %0
|
|
}
|