On 28 Jun 15:24, Ilya Enkovich wrote: > On 16 Jun 10:54, Jeff Law wrote: > > > > I don't see anything particularly worrisome here either -- I have a slight > > concern about correctness issues with only masking loads/stores and > > reductions. But I will defer to your judgment on whether or not there's > > other stuff that we need to mask to combine the epilogue with the loop via > > masking. > > We have to mask operations which may cause errors if executed speculatively. > For others we just ignore produced result. So we don't truly mask reductions > but fix-up their results. I assume memory accesses are only ones we have to > truly mask (plus non-const calls which are rejected now). For signalling > arithmetic I assumed we just don't vectorize it. > > Basically we should act similar to if-conversion. I'll check if it has > restrictions I miss.
I see if-conversion pass checks non-memory statements using gimple_could_trap_p_1 but I don't see similar checks in the vectorizer. Therefore I add similar check into patch #05. Currently we don't have a way to mask such statements except mask their operands to exclude zeros, NaNs etc. and replace them with whatever we want. This seems inefficient though and most probably wouldn't fold into real masked instruction on RTL. We may handle those cases later if find them important. Thanks, Ilya > > > > > Jeff > > Here is an updated patch version. > > Thanks, > Ilya > --