pcc wrote:

> This PR doesn't entirely fix the problem. Another case that I'm seeing (and 
> which is more effectively prevented by the previous approach) is where GVN 
> PRE moves the zext behind a phi, and after subsequent optimization passes it 
> turns into a phi pointing to other phis which ultimately point to identical 
> (in the `isIdenticalTo` sense) zext instructions. We could address this in 
> CGP by trying harder to undo what GVN did: we can check that all instructions 
> directly/indirectly referenced by a phi are identical and then replace the 
> usages of the phi with a clone of one of the instructions.

Done in  #141716

https://github.com/llvm/llvm-project/pull/141326
_______________________________________________
llvm-branch-commits mailing list
llvm-branch-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-branch-commits

Reply via email to