Files
clang-p2996/llvm/test/CodeGen/LoongArch/e_flags.ll
Weining Lu d1f36da9e0 [LoongArch] Encode LoongArch specific ELF e_flags to binary by LoongArchTargetStreamer
Reference: https://github.com/loongson/LoongArch-Documentation
The last commit hash (main branch) is:
99016636af64d02dee05e39974d4c1e55875c45b

Note:
There are several PRs [1][2][3] that may affect the e_flags.
After they got closed or merged, we should update the implementation here accordingly.

[1] https://github.com/loongson/LoongArch-Documentation/pull/33
[2] https://github.com/loongson/LoongArch-Documentation/pull/47
[2] https://github.com/loongson/LoongArch-Documentation/pull/61

Differential Revision: https://reviews.llvm.org/D130239
2022-08-16 13:41:50 +08:00

16 lines
644 B
LLVM

; RUN: llc --mtriple=loongarch32 --filetype=obj %s -o %t-la32
; RUN: llvm-readelf -h %t-la32 | FileCheck %s --check-prefix=ILP32D --match-full-lines
; RUN: llc --mtriple=loongarch64 --filetype=obj %s -o %t-la64
; RUN: llvm-readelf -h %t-la64 | FileCheck %s --check-prefix=LP64D --match-full-lines
;; Note that we have not support the -target-abi option to select specific ABI.
;; See comments in LoongArchELFStreamer.cpp. So here we only check the default behaviour.
;; After -target-abi is supported, we can add more tests.
; LP64D: Flags: 0x3, LP64, DOUBLE-FLOAT
; ILP32D: Flags: 0x7, ILP32, DOUBLE-FLOAT
define void @foo() {
ret void
}