[PATCH] GVN improvement


I've been analyzing GVN algorithm and I've found one place where it could be easily improved.
Note that this is my first patch here. Please be tolerant :wink:

gvn-load-pre.patch (2.18 KB)

Hi Jakub,

This is a very interesting patch. Does it handle the case when a occurs in an (unreachable) infinite loop? In this case, you'd end up walking up the single predecessor infinitely. Have you tested this on llvm-test at all?