[llvm-commits] [llvm] r160117 - in /llvm/trunk: include/llvm/IntrinsicsX86.td lib/Target/X86/X86ISelLowering.cpp lib/Target/X86/X86ISelLowering.h lib/Target/X86/X86InstrInfo.td test/CodeGen/X86/rdrand.ll

Benjamin Kramer benny.kra at gmail.com
Thu Jul 12 11:59:50 PDT 2012


On 12.07.2012, at 20:48, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:

> 
> On Jul 12, 2012, at 11:17 AM, Benjamin Kramer <benny.kra at gmail.com> wrote:
> 
>> 
>> On 12.07.2012, at 19:35, Jakob Stoklund Olesen <stoklund at 2pi.dk> wrote:
>> 
>>> The MachineLICM and MachineCSE passes will leave instructions alone if MCID::UnmodeledSideEffects is set. Set hasSideEffects = 1 in the instruction description.
>>> 
>>> But I think you should give the RDRAND node a chain as well. We really don't want to be clever about reordering these intrinsics since their primary purpose is security software.
>> 
>> The instruction now has side effects and a chain with r160137.
> 
> Thanks!
> 
>> The amusing part is that gcc 4.7 has the same bug so I carefully tested it, but apparently didn't have the right test case to trigger MachineLICM.
> 
> Perhaps there should be a test case for the IR optimizers as well, in case anyone decides the intrinsics DoesNotAccessMemory?

The intrinsic definition has a comment about it, I hope that's enough to deter everyone from adding that flag :)

- Ben





More information about the llvm-commits mailing list