[PATCH] D28875: AArch64LoadStoreOptimizer: Update kill flags when merging stores

Matthias Braun via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jan 19 17:06:24 PST 2017

MatzeB marked an inline comment as done.
MatzeB added inline comments.

Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:707
+      unsigned Reg = getLdStRegOp(*I).getReg();
+      for (MachineInstr &MI : make_range(NextI, Paired))
+        MI.clearRegisterKills(Reg, TRI);
mcrosier wrote:
> If the two instructions being paired happen to be adjacent to one another, NextI will point to the instruction after 'Paired'.  Is this going to behave as expected with make_range()?
Good point, for some reason that case never happened if MergeForward was true, but what I really should be used here is `std::next(I)`.



More information about the llvm-commits mailing list