This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug tree-optimization/77848] Gimple if-conversion results in redundant comparisons
- From: "wschmidt at gcc dot gnu.org" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: Thu, 03 Nov 2016 18:03:19 +0000
- Subject: [Bug tree-optimization/77848] Gimple if-conversion results in redundant comparisons
- Auto-submitted: auto-generated
- References: <bug-77848-4@http.gcc.gnu.org/bugzilla/>
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=77848
--- Comment #4 from Bill Schmidt <wschmidt at gcc dot gnu.org> ---
Ah, never mind, I see what's happening.
The order of events is
* if-conversion
* loop vectorization
* DCE
* cunroll
* slp vectorization
If we force versioning on with if-conversion, then the loop vectorizer sees
that it can't do anything with the loop, so it folds away the if-converted
version. Thus SLP never gets a chance to look at the if-converted loop. So it
seems that always forcing versioning on has an unintended consequence of
missing SLP opportunities.
Should the folding of LOOP_VECTORIZED (1, 2) be deferred to the SLP vectorizer?