I'm not sure what you mean by "the original comparison", but I assume you mean the outer of the two "if" statements. Your reasoning for when "Context.getTypeSize(Base) != Context.getTypeSize(TyPtr)" will be true is correct, but the outer "if" statement's condition will be true in all 4 cases for ARM and AArch64, because "Base->isVectorType()" will be false.
I have tried running the test for AArch64 both with and without the extra check, and it passes iff the check is present. Having said that, it took long enough to convince myself that version two of the patch is correct that I have re-written it to make it clearer, new version of the patch is attached. Oliver From: Renato Golin [mailto:[email protected]] Sent: 06 February 2014 15:27 To: Oliver Stannard Cc: Clang Commits Subject: Re: [PATCH] AAPCS-VFP: double and long double have the same machine type On 6 February 2014 15:03, Oliver Stannard <[email protected]> wrote: I was mistaken, that check was required, because this code is shared between ARM and AArch64. I have attached an updated patch which puts the check back in, and adds a test for this in AArch64. Hi Oliver, That's not what I meant... ;) AFAICT, the ABI says that double and long double have the same size, so why does the original comparison fail in the first place? I mean, from what you said, this: Context.getTypeSize(Base) != Context.getTypeSize(TyPtr) should return false for the cases: {d, d}, {d, ld}, {ld, d} and {ld, ld} on ARM, and true for the two central ones in AArch64. No? If it doesn't, it would be good to understand why not, and fix it at the source. And if it can't be fixed at the source, than a good explanation of why not on the comment is welcome. cheers, --renato
hfa-long-double-4.patch
Description: Binary data
_______________________________________________ cfe-commits mailing list [email protected] http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits
