[all-commits] [llvm/llvm-project] 70608c: [LoongArch] Refactor LoongArchABI::computeTargetABI
wanglei via All-commits
all-commits at lists.llvm.org
Thu May 16 02:15:43 PDT 2024
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 70608c24fae8943cb93276db4d0358722705507b
https://github.com/llvm/llvm-project/commit/70608c24fae8943cb93276db4d0358722705507b
Author: wanglei <wanglei at loongson.cn>
Date: 2024-05-16 (Thu, 16 May 2024)
Changed paths:
M llvm/lib/Target/LoongArch/LoongArchSubtarget.cpp
M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.cpp
M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchBaseInfo.h
M llvm/lib/Target/LoongArch/MCTargetDesc/LoongArchELFStreamer.cpp
M llvm/test/CodeGen/LoongArch/e_flags.ll
M llvm/test/CodeGen/LoongArch/target-abi-from-triple-edge-cases.ll
Log Message:
-----------
[LoongArch] Refactor LoongArchABI::computeTargetABI
The previous logic did not consider whether the architectural features
meet the requirements of the ABI, resulting in the generation of
incorrect object files in some cases. For example:
```
llc -mtriple=loongarch64 -filetype=obj test/CodeGen/LoongArch/ir-instruction/fadd.ll -o t.o
llvm-readelf -h t.o
```
The object file indicates the ABI as lp64d, however, the generated code
is lp64s.
The new logic introduces the `feature-implied` ABI. When both target-abi
and triple-implied ABI are invalid, the feature-implied ABI is used.
Reviewed By: SixWeining, xen0n
Pull Request: https://github.com/llvm/llvm-project/pull/92223
To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications
More information about the All-commits
mailing list