[patch] Two fixes to the vpermilvar optimization

Jim Grosbach grosbach at apple.com
Tue Apr 29 14:30:47 PDT 2014


On Apr 29, 2014, at 2:13 PM, Rafael EspĂ­ndola <rafael.espindola at gmail.com> wrote:

>>> Using a 42 in here has well defined behaviour according to the intel manual.
>> 
>> OK. So this is cleaning things ignored bits of the constant up so the isel matchers will fire correctly? That makes sense. Can you elaborate in the comment a bit?
> 
> No, it is clearing it up so that the created shuffle is valid. In the
> above case the 42 has to be converted to a 1 since vpermilvar.pd only
> uses the second bit for indexing. A shufflevector with an index of 42
> would be invalid.
> 

Sorry, horrible phrasing on my part. Yeah, that. Translating the semantics from one to the other. LGTM.

> Cheers,
> Rafael





More information about the llvm-commits mailing list