[LLVMdev] Use of movupd instead of movapd for x86

Evan Cheng evan.cheng at apple.com
Mon Feb 28 22:26:07 PST 2011


On Feb 28, 2011, at 2:58 AM, Sebastien DELDON-GNB wrote:

> 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.

If llvm is generating movapd then it believes the pointer is aligned. Without having more information it's impossible to tell what the issue is.

Evan

> 
> 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
> 
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev





More information about the llvm-dev mailing list