[GVN] Add tests showing generation of already existent PHIs for non-local loads
When we eliminate a non-local load in a loop, we create a new PHI for the loaded value, while there already may be the exact same PHIs in the loop. IndVarsSimplify currently can handle this case eliminating the duplicated PHIs. However, if the loop PHI is of type of the load and also there exists an use of the z(s)ext'ed of it, IndVarSimplify wouldn't eliminate the duplicating PHI. It would just replace the IV with a widened one, leaving the GVN-generated PHI as is.
Loading
Please sign in to comment