Author: Wang, Pengfei Date: 2021-09-06T20:28:09+08:00 New Revision: e6e8d25920c1f1cffb58c6b3d52c2b4abbb4c963
URL: https://github.com/llvm/llvm-project/commit/e6e8d25920c1f1cffb58c6b3d52c2b4abbb4c963 DIFF: https://github.com/llvm/llvm-project/commit/e6e8d25920c1f1cffb58c6b3d52c2b4abbb4c963.diff LOG: [X86][mingw] Modify the alignment of __m128/__m256/__m512 vector type for mingw This is a follow up patch after D78564 and D108887. Martin helped to confirm the alignment in GCC mingw is the same as the size of vector. https://reviews.llvm.org/D108887#inline-1040893 Reviewed By: mstorsjo Differential Revision: https://reviews.llvm.org/D109265 Added: Modified: clang/lib/CodeGen/TargetInfo.cpp clang/test/CodeGen/x86_32-align-linux.c Removed: ################################################################################ diff --git a/clang/lib/CodeGen/TargetInfo.cpp b/clang/lib/CodeGen/TargetInfo.cpp index b9668607bd3a..5d33403f1233 100644 --- a/clang/lib/CodeGen/TargetInfo.cpp +++ b/clang/lib/CodeGen/TargetInfo.cpp @@ -1170,7 +1170,8 @@ class X86_32ABIInfo : public SwiftABIInfo { IsRetSmallStructInRegABI(RetSmallStructInRegABI), IsWin32StructABI(Win32StructABI), IsSoftFloatABI(SoftFloatABI), IsMCUABI(CGT.getTarget().getTriple().isOSIAMCU()), - IsLinuxABI(CGT.getTarget().getTriple().isOSLinux()), + IsLinuxABI(CGT.getTarget().getTriple().isOSLinux() || + CGT.getTarget().getTriple().isOSCygMing()), DefaultNumRegisterParameters(NumRegisterParameters) {} bool shouldPassIndirectlyForSwift(ArrayRef<llvm::Type*> scalars, diff --git a/clang/test/CodeGen/x86_32-align-linux.c b/clang/test/CodeGen/x86_32-align-linux.c index 6e6ddd757b6f..df864588ae68 100644 --- a/clang/test/CodeGen/x86_32-align-linux.c +++ b/clang/test/CodeGen/x86_32-align-linux.c @@ -1,6 +1,9 @@ // RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -target-feature +avx -emit-llvm -o - %s | FileCheck %s // RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-gnu -target-feature +avx512f -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -target-feature +avx -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -w -fblocks -ffreestanding -triple i386-pc-linux-mingw -target-feature +avx512f -emit-llvm -o - %s | FileCheck %s #include <immintrin.h> _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits