Value-number GVNHoist loads by result type as well as pointer address.
authorChang-Sun Lin Jr <chang-sun.lin.jr@intel.com>
Wed, 30 Mar 2022 18:31:17 +0000 (11:31 -0700)
committerChang-Sun Lin Jr <chang-sun.lin.jr@intel.com>
Wed, 30 Mar 2022 18:33:49 +0000 (11:33 -0700)
commitc28ce745cf1917dedee66719281ac2d5741637f0
tree38d15cac596c93aeb521abe36157caf07d7d46ff
parent85eae45520dd3ace28c7da34f77aaeec566ad97b
Value-number GVNHoist loads by result type as well as pointer address.

Avoids merge errors when opaque pointers are loaded into different types.

Reviewed by: jcranmer-intel, hiraditya
Differential Revision: https://reviews.llvm.org/D122521
llvm/lib/Transforms/Scalar/GVNHoist.cpp
llvm/test/Transforms/GVNHoist/opaque-diff-type.ll [new file with mode: 0644]