summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/ScalarEvolution/nsw-offset.ll
diff options
context:
space:
mode:
authorNick Lewycky <nicholas@mxc.ca>2014-01-27 10:04:03 +0000
committerNick Lewycky <nicholas@mxc.ca>2014-01-27 10:04:03 +0000
commit31eaca5513e9b77069f1d8390a4aba8657da4246 (patch)
tree1a47a44a95c21095003f1b30e2b4801163adb9b6 /llvm/test/Analysis/ScalarEvolution/nsw-offset.ll
parent55139555c4ec5a8c02a334b5a729c09b8787bbcd (diff)
downloadbcm5719-llvm-31eaca5513e9b77069f1d8390a4aba8657da4246.tar.gz
bcm5719-llvm-31eaca5513e9b77069f1d8390a4aba8657da4246.zip
Teach SCEV to handle more cases of 'and X, CST', specifically where CST is any number of contiguous 1 bits in a row, with any number of leading and trailing 0 bits.
Unfortunately, this in turn led to some lower quality SCEVs due to some different paths through expression simplification, so add getUDivExactExpr and use it. This fixes all instances of the problems that I found, but we can make that function smarter as necessary. Merge test "xor-and.ll" into "and-xor.ll" since I needed to update it anyways. Test 'nsw-offset.ll' analyzes a little deeper, %n now gets a scev in terms of %no instead of a SCEVUnknown. llvm-svn: 200203
Diffstat (limited to 'llvm/test/Analysis/ScalarEvolution/nsw-offset.ll')
-rw-r--r--llvm/test/Analysis/ScalarEvolution/nsw-offset.ll2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/test/Analysis/ScalarEvolution/nsw-offset.ll b/llvm/test/Analysis/ScalarEvolution/nsw-offset.ll
index 8969a5ad4ce..88cdcf23d9e 100644
--- a/llvm/test/Analysis/ScalarEvolution/nsw-offset.ll
+++ b/llvm/test/Analysis/ScalarEvolution/nsw-offset.ll
@@ -73,5 +73,5 @@ return: ; preds = %bb1.return_crit_edg
ret void
}
-; CHECK: Loop %bb: backedge-taken count is ((-1 + %n) /u 2)
+; CHECK: Loop %bb: backedge-taken count is ((-1 + (2 * (%no /u 2))) /u 2)
; CHECK: Loop %bb: max backedge-taken count is 1073741822
OpenPOWER on IntegriCloud