diff options
author | Paul Robinson <paul.robinson@sony.com> | 2022-06-02 11:00:32 -0700 |
---|---|---|
committer | Paul Robinson <paul.robinson@sony.com> | 2022-06-02 11:00:54 -0700 |
commit | dc5175adef0804eb396690ea3fe35c6d450e6e64 (patch) | |
tree | 1ec93945f1a7c2d314eb7374a0134345b39aef5b | |
parent | cc756f91c3803a7f91868ecf64929a90399cb4bb (diff) | |
download | llvm-dc5175adef0804eb396690ea3fe35c6d450e6e64.zip llvm-dc5175adef0804eb396690ea3fe35c6d450e6e64.tar.gz llvm-dc5175adef0804eb396690ea3fe35c6d450e6e64.tar.bz2 |
[PS5] Make passing unions in registers match PS4 ABI
-rw-r--r-- | clang/lib/CodeGen/TargetInfo.cpp | 2 | ||||
-rw-r--r-- | clang/test/CodeGen/X86/avx-union.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 0f4987e..5e97a94 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -3131,7 +3131,7 @@ void X86_64ABIInfo::classify(QualType Ty, uint64_t OffsetBase, Class &Lo, unsigned idx = 0; bool UseClang11Compat = getContext().getLangOpts().getClangABICompat() <= LangOptions::ClangABI::Ver11 || - getContext().getTargetInfo().getTriple().isPS4(); + getContext().getTargetInfo().getTriple().isPS(); bool IsUnion = RT->isUnionType() && !UseClang11Compat; for (RecordDecl::field_iterator i = RD->field_begin(), e = RD->field_end(); diff --git a/clang/test/CodeGen/X86/avx-union.c b/clang/test/CodeGen/X86/avx-union.c index 386d8cc..65fd62c 100644 --- a/clang/test/CodeGen/X86/avx-union.c +++ b/clang/test/CodeGen/X86/avx-union.c @@ -5,6 +5,7 @@ // RUN: %clang_cc1 -no-opaque-pointers -w -ffreestanding -triple x86_64-linux-gnu -target-feature +avx -fclang-abi-compat=10.0 -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK-LEGACY,AVX // RUN: %clang_cc1 -no-opaque-pointers -w -ffreestanding -triple x86_64-linux-gnu -target-feature +avx512f -fclang-abi-compat=11.0 -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK-LEGACY,AVX512-LEGACY // RUN: %clang_cc1 -no-opaque-pointers -w -ffreestanding -triple x86_64-scei-ps4 -target-feature +avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-LEGACY +// RUN: %clang_cc1 -no-opaque-pointers -w -ffreestanding -triple x86_64-sie-ps5 -target-feature +avx -emit-llvm -o - %s | FileCheck %s --check-prefix=CHECK-LEGACY // This tests verifies that a union parameter should pass by a vector regitster whose first eightbyte is SSE and the other eightbytes are SSEUP. |