david-arm added a comment.

In D108138#2967100 <https://reviews.llvm.org/D108138#2967100>, @lebedev.ri 
wrote:

> IMO anything other than enhancing LV is wrong.

Hi @lebedev.ri  I personally disagree here. Adding support to LV for this is 
significantly more work (and IMO unnecessary) because there are cases when LV 
has to handle a lot more than just the obvious flattened vectorisation case 
using vector comparisons and select instructions. We will also need to add 
support for vectorisation factors of 1 (with interleaving) and cases where 
VF>1,but we have to scalarise the switch statement. These latter two cases 
require basically doing exactly the same thing as @kmclaughlin's patch does 
here, i.e. unswitching the switch statement into compares/branches and new 
blocks. It seems far simpler to have a small pass that runs prior to the 
vectoriser (when enabled) that unswitches.

Not sure what others think here?


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D108138/new/

https://reviews.llvm.org/D108138

_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to