In the past, if the size value of CacheInfo was greater than Loc's size
value, the CacheInfo would not be dropped and we repalced Loc's size
with CacheInfo's size to compute the dependencies. However it caused two
problems:
- With a greater Loc size, we might get a imprecise result which shows in test GVN/PRE/rle.ll.
2.If we have a pointer value that can be translated to a block twice(%array.2.phi.2 in pr53599.ll), using a greater size may cause dependencies of smaller size been added to greater size's CacheInfo. And then some non-redundant load instructions would be deleted.
Compile time differences:https://llvm-compile-time-tracker.com/compare.php?from=18eb31c096167a1f6185f05338494c82a509ff9e&to=65fba50ce274460ad88f90e0ae29d36869e42d71&stat=instructions:u
Fixes: https://github.com/llvm/llvm-project/issues/63559 and https://github.com/llvm/llvm-project/issues/63611