Fix for PR10293

Michele Scandale michele.scandale at gmail.com
Sat May 4 05:00:52 PDT 2013


Hi everybody,

here I propose a patch for PR 10293, related to loop rotate and missing hoisting 
of loop invariant code.

http://llvm.org/bugs/show_bug.cgi?id=10293

For the case listed in the bug report the proposed solution solve the problem 
because the loop rotation is performed instead of latch simplification, making 
the block that contains the instruction the new loop header. This condition 
allows to hoist the 'load' instruction because now it dominates all the exit 
blocks so is guaranteed to be executed.

The patch postpones the call to 'simplifyLoopLatch' after the effective 
loop-rotation to handle those cases where the rotation may fail.

Thanks in advance.

Michele Scandale
-------------- next part --------------
A non-text attachment was scrubbed...
Name: loop-rotate.patch
Type: text/x-patch
Size: 816 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130504/f3acec92/attachment.bin>


More information about the llvm-commits mailing list