[Patch] [AArch64] Fix registerAllocator assigns same register for base and wback in pre/post-index load and store

Steven Wu stevenwu at apple.com
Mon Aug 11 14:08:35 PDT 2014


Hi Quentin

Here is a patch with testcase added according to Tim’s suggestion. Thanks for the review

Steven

-------------- next part --------------
A non-text attachment was scrubbed...
Name: postindex.patch
Type: application/octet-stream
Size: 4029 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140811/4cd290ee/attachment.obj>
-------------- next part --------------


> On Aug 8, 2014, at 5:20 PM, Quentin Colombet <qcolombet at apple.com> wrote:
> 
> Hi Steven,
> 
> Could you add a few test cases? (Ideally one per instruction you are patching.)
> 
> Thanks,
> -Quentin
> 
> On Aug 8, 2014, at 5:15 PM, Steven Wu <stevenwu at apple.com> wrote:
> 
>> Hi
>> 
>> This patch fix a bug that sometimes register allocator may assign same register as base and writeback register in pre/post-index loads and stores for AArch64.
>> According to ARMv8 manual, such result will have uncertain behaviors and clang as will reject them as well. Adding earlyclobber constraints to avoid them.
>> Since this behavior will depend on the register allocator so I am not sure how to produce a test. I can provide a testcase if anyone want to reproduce the problem.
>> 
>> Patch attached. Please review and commit it for me.
>> 
>> Thanks
>> 
>> Steven
>> <postindex.patch>
>> 
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
> 



More information about the llvm-commits mailing list