On 10/16/12 13:28, Jakub Jelinek wrote:
I see another problem with noce_can_store_speculate_p, the return false; checks. The search for a store to exactly that location can be done just on post dominator bbs, but I wonder how you can avoid looking for volatile insns or non-const/pure calls (or insns that may modify the address) also in other bbs. What if there is: location of considered if-conversion on mem if (some_condition) call (); mem = something;
Are we not currently being conservative in the current code and returning false once we see a volatile or a non-const call?
? We only walk immediate post-dominators, so look at the bb containing mem = something;, but I think a call/volatile insn/modification of mem's address is problematic in any bb on any path in between test_bb and the post-dominator on which the write has been found. Jakub