Files
clang-p2996/llvm/lib/Target/LoongArch/LoongArchSubtarget.cpp
wanglei 70608c24fa [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
2024-05-16 17:15:21 +08:00

3.3 KiB