We already try not to truncate PHIs in computeMinimalBitwidths. LoopVectorize can't handle it and we really don't need to, because both induction and reduction PHIs are truncated by other means.
However, we weren't bailing out in all the places we should have, and we ended up by returning a PHI to be truncated, which has caused PR27018.
This fixes PR17018.
Hi James,
Why would this be a problem for the loop vectorizer (we should state this here)? Also, won't indvars generally extend the phi?
Cheers,
Silviu