Sebastien DELDON-GNB
2011-Feb-25 08:54 UTC
[LLVMdev] Use of movupd instead of movapd for x86
Hi all, Is there a way to force llc to generate movupd instruction instead of movapd for x86 target ? I know that movapd is more performant, but I would like to measure degradation when alignment constraints are not met. Best Regards Seb -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110225/8d401a39/attachment.html>
Sebastien DELDON-GNB <sebastien.deldon at st.com> writes:> Hi all, > > Is there a way to force llc to generate movupd instruction instead of movapd for x86 target ? > > I know that movapd is more performant, but I would like to measure degradation when alignment constraints are not met.On modern processors a movupd on aligned data is going to be indistinguishable in performance from a movapd. -Dave
On Feb 25, 2011, at 12:54 AM, Sebastien DELDON-GNB wrote:> Hi all, > > > Is there a way to force llc to generate movupd instruction instead of movapd for x86 target ? > I know that movapd is more performant, but I would like to measure degradation when alignment constraints are not met. >You can hack loads and stores to have alignment of 1 in the IR, or hack LLC itself. -Chris -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20110225/c3be42cd/attachment.html>
Sebastien DELDON-GNB
2011-Feb-28 10:58 UTC
[LLVMdev] Use of movupd instead of movapd for x86
Understood for the aligned case, I want to measure performance degradation for unaligned case. I mean unaligned case versus aligned. I know this is stupid, but I want to try to pass a <4 x float>* as parameter of a routine and at the call site I want to pass a misaligned pointer. Since LLVM is generating movapd instruction it will raise an exception (SEGFAULT), I just want to know if there is a way to enforce generation of movupd instruction instead of movapd. Seb> -----Original Message----- > From: David A. Greene [mailto:greened at obbligato.org] > Sent: Friday, February 25, 2011 5:13 PM > To: Sebastien DELDON-GNB > Cc: llvmdev at cs.uiuc.edu > Subject: Re: [LLVMdev] Use of movupd instead of movapd for x86 > > Sebastien DELDON-GNB <sebastien.deldon at st.com> writes: > > > Hi all, > > > > Is there a way to force llc to generate movupd instruction instead of > movapd for x86 target ? > > > > I know that movapd is more performant, but I would like to measure > degradation when alignment constraints are not met. > > On modern processors a movupd on aligned data is going to be > indistinguishable in performance from a movapd. > > -Dave