summaryrefslogtreecommitdiffstats
path: root/llvm/test/Analysis/DemandedBits/basic.ll
Commit message (Collapse)AuthorAgeFilesLines
* Fix tests after move to utohexstr.Benjamin Kramer2017-12-281-3/+3
| | | | llvm-svn: 321527
* Port DemandedBits to the new pass manager.Michael Kuperstein2016-04-181-2/+2
| | | | | | Differential Revision: http://reviews.llvm.org/D18679 llvm-svn: 266699
* [DemandedBits] Revert r249687 due to PR26071James Molloy2016-02-031-31/+0
| | | | | | | | | | | | | | This regresses a test in LoopVectorize, so I'll need to go away and think about how to solve this in a way that isn't broken. From the writeup in PR26071: What's happening is that ComputeKnownZeroes is telling us that all bits except the LSB are zero. We're then deciding that only the LSB needs to be demanded from the icmp's inputs. This is where we're wrong - we're assuming that after simplification the bits that were known zero will continue to be known zero. But they're not - during trivialization the upper bits get changed (because an XOR isn't shrunk), so the icmp fails. The fault is in demandedbits - its contract does clearly state that a non-demanded bit may either be zero or one. llvm-svn: 259649
* [DemandedBits] Fix computation of demanded bits for ICmpsJames Molloy2016-01-251-2/+11
| | | | | | | | | | The computation of ICmp demanded bits is independent of the individual operand being evaluated. We simply return a mask consisting of the minimum leading zeroes of both operands. We were incorrectly passing "I" to ComputeKnownBits - this should be "UserI->getOperand(0)". In cases where we were evaluating the 1th operand, we were taking the minimum leading zeroes of it and itself. This should fix PR26266. llvm-svn: 258690
* Compute demanded bits for icmp instructionsJames Molloy2015-10-081-0/+22
| | | | | | | | | Instead of bailing out when we see an icmp, we can instead at least say that if the upper bits of both operands are known zero, they are not demanded. This doesn't help with signed comparisons, but it's at least better than bailing out. llvm-svn: 249687
* Treat Mul just like Add and SubtractJames Molloy2015-10-081-0/+12
Like adds and subtracts, muls ripple only to the left so we can use the same logic. While we're here, add a print method to DemandedBits so it can be used with -analyze, which we'll use in the testcase. llvm-svn: 249686
OpenPOWER on IntegriCloud