https://gcc.gnu.org/bugzilla/show_bug.cgi?id=120805
Avinash Jayakar <avinashd at linux dot ibm.com> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |avinashd at linux dot ibm.com --- Comment #4 from Avinash Jayakar <avinashd at linux dot ibm.com> --- I am fairly new to the gcc repository and I was looking at into this issue. I had a few doubts on these changes that were done from using log2 to using division. So the difference we are seeing is mainly due to the if condition if (stmts != NULL && const_vf > 0) being always active. Previously this if condition was if (stmts != NULL && log_vf) the condition inside would be false, when log_vf was null, this would happen when LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo) was true, which I think is for the epilogue of the loop which has to use partial vectors. But with the new change, the const_vf variable will always be 4 since in the condition if (vf.is_constant (&const_vf) && !LOOP_VINFO_USING_PARTIAL_VECTORS_P (loop_vinfo)) we assign its value to the vector length. I believe that the previous behaviour was correct, where you do not need to assign the range info to the epilogue. Adding the range info has different lowering path within the rtl for powerpc, which I have not yet investigated yet. So my main doubt here is const_vf, is supposed to be 0 for the epilogue block right, just like log_vf was null for the epilogue. If so, this is a simple fix, by assigning a temporary_const_vf, and assigning the actual value inside the latter mentioned if block. Please do let me know, in this case I can create a patch.