-
Notifications
You must be signed in to change notification settings - Fork 103
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CIR] [Lowering] [X86_64] VaArg for long double in x86 #1087
Conversation
2b69de9
to
7d28be4
Compare
Fixed |
Wow, this is amazing. Is that only for x86_64 or did you try other arches? |
I'll take a look after the next PR update (conflicts + stacked approach, or after the other one lands) |
I only tested on X86_64 |
Close to create stacked PR |
@bcardosolopes after I rebased, I noticed the return value of |
That might be related to #1089? That reverted a previously landed commit, and there's some discussion there. |
It looks like the case. Thanks. |
Thanks. BTW, can we add a rule like the upstream that we can only create branches starts with |
This patch implements transformations for VAArg in X86_64 ABI **in shape**. `In shape` means it can't work properly due to the dependent X86_64 ABI is not robust. e.g., when we want to use VAArg with `long double`, we need #1087. This patch literally implement https://github.com/llvm/llvm-project/blob/d233fedfb0de882353c348cd1ac57dab619efa6d/clang/lib/CodeGen/Targets/X86.cpp#L3015-L3240 in CIR. There some differences due to the traditional pipeline are converting AST to LLVM and we're transforming CIR to CIR. And also to get the ABI Info, I moved `X86_64ABIInfo` to the header.
This is the following of #1086. Since I can't create branches to this repo so that I can't start real stacked PRs. After #1086 got merged, the PR will show the real change. This PR is for preview only.
After #1086, when we want to use
LongDouble
forVAArg
, we will be in trouble due to details in X86_64's ABI and this patch tries to address this.The practical impact the patch is, after this patch, with #1088 and a small following up fix, we can build and run all C's benchmark in SpecCPU 2017. I think it is a milestone.