[PATCH] D114536: [X86][MS] Fix the wrong alignment of vector variable arguments on Win32
Phoebe Wang via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 3 07:57:44 PST 2022
pengfei added a comment.
In D114536#3291195 <https://reviews.llvm.org/D114536#3291195>, @rnk wrote:
> lgtm
>
> Sorry for the delay, I was out sick, and this fell out of my inbox.
Thanks for the review. It's all right. Take care!
================
Comment at: llvm/lib/Target/X86/X86ISelLowering.cpp:4094
+ MaybeAlign Alignment;
+ if (Subtarget.isTargetWindowsMSVC() && !Subtarget.is64Bit() &&
+ Arg.getSimpleValueType() != MVT::f80)
----------------
rnk wrote:
> I think this could be simplified to use getStackAlign, but I won't insist.
I don't think so. The alignment are inconstant with different types on different OSs. Take CC_X86_64_C for example, https://github.com/llvm/llvm-project/blob/main/llvm/lib/Target/X86/X86CallingConv.td#L592-L603 f80/f128 are determined by layout and vector types are aligned to their size.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D114536/new/
https://reviews.llvm.org/D114536
More information about the llvm-commits
mailing list