summaryrefslogtreecommitdiffstats
path: root/clang/lib/CodeGen/CoverageMappingGen.cpp
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@gmail.com>2016-06-29 03:46:47 +0000
committerCraig Topper <craig.topper@gmail.com>2016-06-29 03:46:47 +0000
commit2cc199baff23cd61cb9d28865ca9ffe4574f3c31 (patch)
tree816d672d445f4a0ef677c91c96d2aa3cb2e5c8c6 /clang/lib/CodeGen/CoverageMappingGen.cpp
parent3a011de10cffec5d37819aa5f4234603dc037d33 (diff)
downloadbcm5719-llvm-2cc199baff23cd61cb9d28865ca9ffe4574f3c31.tar.gz
bcm5719-llvm-2cc199baff23cd61cb9d28865ca9ffe4574f3c31.zip
[ValueTracking] Teach computeKnownBits for PHI nodes to compute sign bit for a recurrence with a NSW addition.
If a operation for a recurrence is an addition with no signed wrap and both input sign bits are 0, then the result sign bit must also be 0. Similar for the negative case. I found this deficiency while playing around with a loop in the x86 backend that contained a signed division that could be optimized into an unsigned division if we could prove both inputs were positive. One of them being the loop induction variable. With this patch we can perform the conversion for this case. One of the test cases here is a contrived variation of the loop I was looking at. Differential revision: http://reviews.llvm.org/D21493 llvm-svn: 274098
Diffstat (limited to 'clang/lib/CodeGen/CoverageMappingGen.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud