summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/UnreachableBlockElim.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-01-06 06:19:46 +0000
committerChris Lattner <sabre@nondot.org>2011-01-06 06:19:46 +0000
commit5858e091a6efc0764db41e8dea81e62b185b7a77 (patch)
tree996c5f6230163426fc2861ddb66555ae219e3269 /llvm/lib/CodeGen/UnreachableBlockElim.cpp
parentc052ba7ff36aea46309986cdc90a04072c087f01 (diff)
downloadbcm5719-llvm-5858e091a6efc0764db41e8dea81e62b185b7a77.tar.gz
bcm5719-llvm-5858e091a6efc0764db41e8dea81e62b185b7a77.zip
implement constant folding support for an exotic constant expr:
ret i64 ptrtoint (i8* getelementptr ([1000 x i8]* @X, i64 1, i64 sub (i64 0, i64 ptrtoint ([1000 x i8]* @X to i64))) to i64) to "ret i64 1000". This allows us to correctly compute the trip count on a loop in PR8883, which occurs with std::fill on a char array. This allows us to transform it into a memset with a constant size. llvm-svn: 122950
Diffstat (limited to 'llvm/lib/CodeGen/UnreachableBlockElim.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud