Re: [patch] PR54149: fix data race in LIM pass

2012-09-11 Thread Aldy Hernandez
ok with && gimple_assign_lhs_ptr (loc->stmt) == loc->ref instead. Let's hope we conservatively catch all writes to ref this way (which is what we need, right)? Yes. Thanks. Committing the attached patch. PR middle-end/54149 * tree-ssa-loop-im.c (execute_sm_if_changed_

Re: [patch] PR54149: fix data race in LIM pass

2012-09-11 Thread Richard Guenther
On Tue, Sep 11, 2012 at 1:15 AM, Aldy Hernandez wrote: > In this failing testcase the LIM pass writes to g_13 regardless of the > initial value of g_13, which is the test protecting the write. This causes > an incorrect store data race wrt both the C++ memory model and transactional > memory (the

[patch] PR54149: fix data race in LIM pass

2012-09-10 Thread Aldy Hernandez
In this failing testcase the LIM pass writes to g_13 regardless of the initial value of g_13, which is the test protecting the write. This causes an incorrect store data race wrt both the C++ memory model and transactional memory (the latter if the store occurs inside of a transaction). The