[PATCH] D16785: [AArch64] AArch64LoadStoreOptimizer: fix bug in pre-inc check iterator
Geoff Berry via llvm-commits
llvm-commits at lists.llvm.org
Mon Feb 1 13:29:34 PST 2016
gberry added inline comments.
================
Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:957
@@ -956,1 +956,3 @@
unsigned Reg = MO.getReg();
+ if (!Reg)
+ continue;
----------------
mcrosier wrote:
> Did you mean to delete lines 954 and 955? Otherwise, I'm not sure why this check would be necessary.
No, lines 954, 955 filter out non-register operands, this new check filters out register operands of register 0, which is not a real register. These can show up in dbg_value instructions, which I removed as a special case in the loop below.
This idiom (check for reg operand, then check for reg != 0) appears in quite a few places.
================
Comment at: lib/Target/AArch64/AArch64LoadStoreOptimizer.cpp:1454
@@ -1453,1 +1453,3 @@
+ break;
+ } while(true);
return E;
----------------
mcrosier wrote:
> Space between the while and the (.
>
> Or why not just while (MBBI != B)?
Yep and yep.
http://reviews.llvm.org/D16785
More information about the llvm-commits
mailing list