Author: Paul Robinson Date: 2022-06-02T11:00:54-07:00 New Revision: dc5175adef0804eb396690ea3fe35c6d450e6e64
URL: https://github.com/llvm/llvm-project/commit/dc5175adef0804eb396690ea3fe35c6d450e6e64 DIFF: https://github.com/llvm/llvm-project/commit/dc5175adef0804eb396690ea3fe35c6d450e6e64.diff LOG: [PS5] Make passing unions in registers match PS4 ABI Added: Modified: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/X86/avx-union.c Removed: ################################################################################ diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index 0f4987efae75..5e97a946782c 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 386d8cc32ec4..65fd62cf45bf 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. _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits