Don't unroll loops whose header block's address is taken.
authorChris Lattner <sabre@nondot.org>
Fri, 18 Feb 2011 04:25:21 +0000 (04:25 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 18 Feb 2011 04:25:21 +0000 (04:25 +0000)
commitf5ebfb0d2852e70f11ca7b8d11f704a1378756d8
tree6b696c06800385fb0c4bd786cb820a98807f9687
parent90d238ce8aa68c4ecb9a8d038ba09f263acf4305
Don't unroll loops whose header block's address is taken.
This is part of a futile attempt to not "break" bizzaro
code like this:

 l1:
  printf("l1: %p\n", &&l1);
  ++x;

  if( x < 3 ) goto l1;

Previously we'd fold &&l1 to 1, which is fine per our semantics
but not helpful to the user.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125827 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/Utils/LoopUnroll.cpp