2 ;; Test we can infer the e_machine value EM_RISCV from a bitcode file.
4 ; RUN: split-file %s %t
5 ; RUN: llvm-as %t/32.ll -o %t/32.o
6 ; RUN: ld.lld %t/32.o -o %t/32
7 ; RUN: llvm-readobj -h %t/32 | FileCheck %s --check-prefixes=CHECK,RV32
9 ; RUN: llvm-as %t/64.ll -o %t/64.o
10 ; RUN: ld.lld %t/64.o -o %t/64
11 ; RUN: llvm-readobj -h %t/64 | FileCheck %s --check-prefixes=CHECK,RV64
15 ; CHECK: DataEncoding: LittleEndian
16 ; CHECK: Machine: EM_RISCV
19 target datalayout = "e-m:e-p:32:32-i64:64-n32-S128"
20 target triple = "riscv32-unknown-elf"
22 define void @_start() {
27 target datalayout = "e-m:e-p:64:64-i64:64-i128:128-n64-S128"
28 target triple = "riscv64-unknown-elf"
30 define void @_start() {