[PATCH] Improvde code quality of vselect

Nadav Rotem nrotem at apple.com
Wed Apr 10 17:30:50 PDT 2013


Michael, 

I think that the best way to handle the redundant sign-extending is to improve the simplify-demanded-bits optimization.  Last year I added some code to optimize the X86::VSELECT using simplify-demanded-bits.  Do you know why it does not work ?

Thanks,
Nadav

On Apr 10, 2013, at 4:48 PM, Michael Liao <michael.liao at intel.com> wrote:

> Hi,
> 
> As we canonicalize sext from i1 to select in instcomb, it generates redundant code to prepare all 0s and all 1s if we don't take it into account that, in SSE/AVX, packed comparisons output all 0s or 1s in SIMD lanes. The attached patch adds optimization for those cases and transforms select into AND/OR to reduce BLEND pressure when profitable.
> 
> Thanks for review
> - Michael
> 
> <0001-Add-optimization-to-leverage-all-0s-1s-produced-by-p.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/20130410/3d54ef24/attachment.html>


More information about the llvm-commits mailing list