summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-cov/SourceCoverageView.h
diff options
context:
space:
mode:
authorTobias Grosser <tobias@grosser.es>2015-06-03 14:43:01 +0000
committerTobias Grosser <tobias@grosser.es>2015-06-03 14:43:01 +0000
commit224b16228028554e3594c0b72b3dacf3893d22d6 (patch)
treebd75077ee5fd0b2f33806b43e5e116021b4572a0 /llvm/tools/llvm-cov/SourceCoverageView.h
parentaef6d17c8d8b39473557a2177a0d3e188c4704ff (diff)
downloadbcm5719-llvm-224b16228028554e3594c0b72b3dacf3893d22d6.tar.gz
bcm5719-llvm-224b16228028554e3594c0b72b3dacf3893d22d6.zip
Only convert power-of-two floor-division with non-negative denominator
floord(a,b) === a ashr log_2 (b) holds for positive and negative a's, but shifting only makes sense for positive values of b. The previous patch did not consider this as isl currently always produces postive b's. To avoid future surprises, we check that b is positive and only then apply the optimization. We also now correctly check the return value of the dyn-cast. No additional test case, as isl currently does not produce negative denominators. Reported-by: David Majnemer <david.majnemer@gmail.com> llvm-svn: 238927
Diffstat (limited to 'llvm/tools/llvm-cov/SourceCoverageView.h')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud