On 2/27/20 8:52 AM, Jakub Jelinek wrote:
On Thu, Feb 27, 2020 at 08:47:19AM -0600, Bill Schmidt wrote:
But is this actually a good idea?  It seems to me this will generate lousy
code in the absence of hardware support.  Won't we be better off warning and
ignoring the directive, leaving the code in scalar form?
Depends on the exact code, I think sometimes it will be just fine and will
allow vectorizing something that really couldn't be otherwise.
Isn't it better to leave it for the user to decide?
They can always ask for it not to be generated (add notinbranch) if it isn't
worthwhile.

You need a high ratio of unguarded code to guarded code in order to pay for all
those vector extract and reconstruct operations.  Sure, some code will be fine,
but a lot of code will be lousy.  This will be particularly true on older
hardware with a less exhaustive set of vector operations.

In the lousy-code case, my concern is that the user won't be savvy enough to
understand they should add notinbranch.  They'll just notice that their code
runs badly on Power and either complain (good, then we can explain it) or
abandon porting existing code to Power (very bad, and we may never know).
I don't like the downside, and the upside is quite unpredictable.

Bill


        Jakub

Reply via email to