This is an archive of the discontinued LLVM Phabricator instance.

[SLP] introduce control over arithmetic horizontal reduction
AbandonedPublic

Authored by fedor.sergeev on Jan 15 2019, 3:10 AM.

Details

Summary

Horizontal reduction on AND (relatively recent transformation
introduced by rL345037) causes PR40310 miscompile.

Introducing -slp-vectorize-hor-arith boolean control to enable/disable
just horizontal reduction for arithmetic operations other than ADD/FADD.

Open question: true or false by default?

Diff Detail

Event Timeline

fedor.sergeev created this revision.Jan 15 2019, 3:10 AM

clang-formatting

I'm really not sure about this - PR40310 is most likely a bug in the reduction code so isn't it likely that Add/FAdd can be affected by it as well?

adding control to a couple tests that expect hor to happen

I'm really not sure about this - PR40310 is most likely a bug in the reduction code so isn't it likely that Add/FAdd can be affected by it as well?

I'm not pushing this particular solution, its here only as a possible short-term.
However, I need to note that we have fuzzer running continuously and it started regularly finding bugs in reduction only after the aforementioned change went in.
Since late-October time we found ~10 different variations of it.

Given that we had no fuzzer bugs found in the vicinity of this code before late-October, it is safe to conclude that Add/FAdd does not trigger
the bug anywhere that often, even if the bug is in a common code.

fedor.sergeev abandoned this revision.Jan 16 2019, 6:23 AM

There is a proper fix suggested by @ABataev in PR40310, dropping this.