[PATCH] Remove spurious mask operations from AArch64 add->compares on 16 and 8 bit values

Louis Gerbarg lgg at apple.com
Mon Aug 25 15:46:17 PDT 2014


Attached is a patch that should address your concerns. I provided a basic explanation of how the equations work and how they were derived. Not sure if I can go into much more depth without it being a bit over the top.

Louis
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Remove-spurious-mask-operations-from-AArch64-add-com.patch
Type: application/octet-stream
Size: 17923 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140825/69228d54/attachment.obj>
-------------- next part --------------

> On Aug 22, 2014, at 12:07 PM, Quentin Colombet <qcolombet at apple.com> wrote:
> 
> Hi Louis,
> 
> Thanks for working on this, I like the general direction of your patch.
> 
> I haven’t looked at the logic closely yet, but here are a couple of comments:
> - LLVM comments are complete sentences, please use a period at the end of your comments.
> 
> - The following comment is not very helpful. Could you explain the voodoo you are using (like a comment before each case), and give a brief description of the function instead of a link? For instance, I would have expected an explanation of what the arguments are and how they are used.
> // This function does a whole lot of voodoo to determine if the tests are
> // equivalent without with a mask. See:
> // http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074444.html
> 
> - Any particular reason why ExtType is a pointer and not a reference?
> bool checkValueWidth(SDValue V, unsigned width, ISD::LoadExtType *ExtType) {
> 
> - Use CHECK-LABEL to match function names in the test cases, e.g.,
> ; CHECK: test8_8
> 
> Thanks,
> -Quentin
> 
> On Aug 21, 2014, at 2:21 PM, Louis Gerbarg <lgg at apple.com> wrote:
> 
>> This is the patch I discussed a while back in http://lists.cs.uiuc.edu/pipermail/llvmdev/2014-July/074444.html. It eliminates spurious ands on 8 and 16 bit operations that have been promoted to 32 bit that have no material impact on these test cases they are fed into. It remove them in several cases that have come up in testing. It is entirely possible there are missed cases due to a slightly differently configured DAG, but adding those should be simple if we have examples of them. This patch has been tested against LNT on AArch64 hardware and includes tests that were randomly generated using on device data as well as ones derives from actual bugs.
>> 
>> Louis
>> <0001-Remove-spurious-mask-operations-from-AArch64-add-com.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