[LLVMdev] Implementing llvm.memory.barrier on PowerPC

Dale Johannesen dalej at apple.com
Thu Aug 21 10:14:36 PDT 2008


This looks OK to check in, do you have write access?

On Aug 21, 2008, at 6:38 AMPDT, Gary Benson wrote:

> Dale Johannesen wrote:
>> On Aug 19, 2008, at 7:18 AMPDT, Gary Benson wrote:
>>> I'm trying to implement llvm.memory.barrier on PowerPC.  I've
>>> modelled my patch (attached) on the implementation in X86, but
>>> when I try and compile my test file (also attached) with llc I
>>> get the error "Cannot yet select: 0x10fa4ad0: ch = MemBarrier
>>> 0x10fa4828, 0x10fa4c68, 0x10fa4be0, 0x10fa4be0, 0x10fa4be0,
>>> 0x10fa4be0".  This presumably means my "membarrier" pattern
>>> isn't being found... but why?
>>
>> Because the i1's in the .bc file get promoted to i32 on ppc,
>> instead of i8.  I've forgotten why this is, there's a setting
>> somewhere.  If you change the i8's in membarrier to i32's it
>> works.
>
> Thanks for that.  Attached is a working implementation of
> llvm.memory.barrier.
>
>> Thanks for doing this btw.
>
> No problem, I need it! ;)
>
> Cheers,
> Gary
>
> -- 
> http://gbenson.net/
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: memory-barrier-take2.patch
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080821/6b36a0ee/attachment.ksh>
-------------- next part --------------
> _______________________________________________
> 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