[PATCH] ARM FastISel fix sext/zext fold
Nick Lewycky
nicholas at mxc.ca
Mon Jun 10 11:03:39 PDT 2013
Chad Rosier wrote:
> Hi JF,
> Below are a few comments.
>
> The for loop should be written as:
>
> for (unsigned i = 0, e = sizeof(FoldableExtends) /
> sizeof(FoldableExtends[0]); i < e; ++i) {
> . . .
> }
Did you mean:
for (unsigned i = 0, e = array_lengthof(FoldableExtends); i < e; ++i) {
? It's defined in ADT/STLExtras.h.
>
> Are there existing test cases that exercise this code? If not, please
> add the necessary test cases.
>
> Otherwise, LGTM.
>
> Chad
>
>
> On Jun 8, 2013, at 12:46 PM, JF Bastien <jfb at google.com
> <mailto:jfb at google.com>> wrote:
>
>> This was the wrong patch, here's the correct one.
>>
>>
>> On Sat, Jun 8, 2013 at 12:26 PM, JF Bastien <jfb at google.com
>> <mailto:jfb at google.com>> wrote:
>>
>> Sign- and zero-extension folding was slightly incorrect because it
>> wasn't checking that the shift on extensions was zero. Further, I
>> recently added AND rd, rn, #255 as a form of 8-bit zero extension,
>> and failed to add the folding code for it.
>>
>> This patch fixes both issues.
>>
>> This patch fixes both, and the test should remain the same:
>> test/CodeGen/ARM/fast-isel-fold.ll
>>
>>
>> <fastisel-fix-ext-fold.patch>_______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu <mailto:llvm-commits at cs.uiuc.edu>
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
>
> _______________________________________________
> 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