diff options
author | James Molloy <james.molloy@arm.com> | 2016-08-15 07:53:03 +0000 |
---|---|---|
committer | James Molloy <james.molloy@arm.com> | 2016-08-15 07:53:03 +0000 |
commit | 196ad0823e67bffef39983fbd9d7c13fb25911b6 (patch) | |
tree | 9bdc1e2cbd6c94f8f75a6304847c91a206b6b7fe /llvm/test/CodeGen/Hexagon/hwloop-loop1.ll | |
parent | a5c8a685356a5c5e956723429f7c2c39f8fbcd37 (diff) | |
download | bcm5719-llvm-196ad0823e67bffef39983fbd9d7c13fb25911b6.tar.gz bcm5719-llvm-196ad0823e67bffef39983fbd9d7c13fb25911b6.zip |
[LSR] Don't try and create post-inc expressions on non-rotated loops
If a loop is not rotated (for example when optimizing for size), the latch is not the backedge. If we promote an expression to post-inc form, we not only increase register pressure and add a COPY for that IV expression but for all IVs!
Motivating testcase:
void f(float *a, float *b, float *c, int n) {
while (n-- > 0)
*c++ = *a++ + *b++;
}
It's imperative that the pointer increments be located in the latch block and not the header block; if not, we cannot use post-increment loads and stores and we have to keep both the post-inc and pre-inc values around until the end of the latch which bloats register usage.
llvm-svn: 278658
Diffstat (limited to 'llvm/test/CodeGen/Hexagon/hwloop-loop1.ll')
-rw-r--r-- | llvm/test/CodeGen/Hexagon/hwloop-loop1.ll | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/llvm/test/CodeGen/Hexagon/hwloop-loop1.ll b/llvm/test/CodeGen/Hexagon/hwloop-loop1.ll index 8b02736e037..238d34e7ea1 100644 --- a/llvm/test/CodeGen/Hexagon/hwloop-loop1.ll +++ b/llvm/test/CodeGen/Hexagon/hwloop-loop1.ll @@ -2,8 +2,6 @@ ; ; Generate loop1 instruction for double loop sequence. -; CHECK: loop0(.LBB{{.}}_{{.}}, #100) -; CHECK: endloop0 ; CHECK: loop1(.LBB{{.}}_{{.}}, #100) ; CHECK: loop0(.LBB{{.}}_{{.}}, #100) ; CHECK: endloop0 |