diff options
author | Craig Topper <craig.topper@intel.com> | 2019-09-06 06:02:13 +0000 |
---|---|---|
committer | Craig Topper <craig.topper@intel.com> | 2019-09-06 06:02:13 +0000 |
commit | 0482c264287f5604fb11f78737f2df1bd4f67e0b (patch) | |
tree | 2d8ad28a3edc9ddf8914ce4a0316b5b03c68d434 /lib/Frontend/CompilerInvocation.cpp | |
parent | d5442965f032b33d7c79b6ecc561b1cb26bbfd63 (diff) | |
download | clang-0482c264287f5604fb11f78737f2df1bd4f67e0b.tar.gz |
[X86] Prevent passing vectors of __int128 as <X x i128> in llvm IR
As far as I can tell, gcc passes 256/512 bit vectors __int128 in memory. And passes a vector of 1 _int128 in an xmm register. The backend considers <X x i128> as an illegal type and will scalarize any arguments with that type. So we need to coerce the argument types in the frontend to match to avoid the illegal type.
I'm restricting this to change to Linux and NetBSD based on the
how similar ABI changes have been handled in the past.
PS4, FreeBSD, and Darwin are unaffected. I've also added a
new -fclang-abi-compat version to restore the old behavior.
This issue was identified in PR42607. Though even with the types changed, we still seem to be doing some unnecessary stack realignment.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@371169 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Frontend/CompilerInvocation.cpp')
-rw-r--r-- | lib/Frontend/CompilerInvocation.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/Frontend/CompilerInvocation.cpp b/lib/Frontend/CompilerInvocation.cpp index 711f7dfa65..f1624532f8 100644 --- a/lib/Frontend/CompilerInvocation.cpp +++ b/lib/Frontend/CompilerInvocation.cpp @@ -3164,6 +3164,8 @@ static void ParseLangArgs(LangOptions &Opts, ArgList &Args, InputKind IK, Opts.setClangABICompat(LangOptions::ClangABI::Ver6); else if (Major <= 7) Opts.setClangABICompat(LangOptions::ClangABI::Ver7); + else if (Major <= 9) + Opts.setClangABICompat(LangOptions::ClangABI::Ver9); } else if (Ver != "latest") { Diags.Report(diag::err_drv_invalid_value) << A->getAsString(Args) << A->getValue(); |