<div dir="ltr">Hi, bcahoon,<div><br></div><div>I found in Machinepipeliner, addLoopCarriedDependences function only create store-->load true mem dependence when identifying recurrences.</div><div>But in ScheduleDAGInstrs, there may be three kinds of mem order dependencies(store-->load, load-->store, store-->store) inside one iteration.</div><div>When calculating loop carried dependence, in addition to register dependence(phis), we also need to consider the above three kinds of memory dependencies to build cross iterations graph.</div><div>For example,</div><div>    STORE Reg1, Reg0 + Offset0      //INSN_A</div><div>    ... ...</div><div>    STORE Reg3, Reg2 + Offset2      //INSN_B</div><div>If INSN_A-->INSN_B(<b>store-->store</b>) had  mem order dependence inside the iteration(Assuming that alias analysis result for the addresses Reg0 + Offset0/Reg2 + Offset2 were dependent)</div><div>For  cross iteration dependence, INSN_B-->INSN_A must have mem order dependence too.</div><div>So I wonder why in current implementation of swp, there're no enough mem loop carried dependence? will it cause some correct problems?</div><div>Also, I checked SMS pass in GCC, and found that DDG graph will construct correct cross iteration memory dependence(store-->load, load-->store, store-->store)</div><div><br></div><div>Thanks,</div><div>Wei Wei</div></div>