[PATCH] ARM FastISel fix sext/zext fold

Chad Rosier mcrosier at apple.com
Mon Jun 10 09:56:06 PDT 2013


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) {
 . . .
}

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> 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> 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
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130610/b408c6ef/attachment.html>


More information about the llvm-commits mailing list