[PATCH] D29200: [JumpThread] Enhance finding partial redundant loads by continuing scanning single predecessor
Daniel Berlin via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 2 07:47:29 PST 2017
dberlin added a comment.
Also, for the record, all of these testcases are fully redundant loads.
they are all of the form
This is a full redundancy. The initial load dominates the others, with nothing in between, and so they are fully redundant This is also why every pass we have that does any load elimination will already eliminate them.
A partially redundant load would be
This load is partially redundant because it unnecessarily happens twice when we take the if(a)'s true branch
PRE will turn it into:
result = phi(...)
As mentioned, GVN already does this transformation, so i'd really like to see a testcase where you doing this in jump threading enables an optimization we don't get already.
More information about the llvm-commits