summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Analysis/ValueTracking.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2011-05-22 18:18:41 +0000
committerChris Lattner <sabre@nondot.org>2011-05-22 18:18:41 +0000
commit7c99f19d9f5919dd4809aa5a5c84f5ff7807aafd (patch)
tree1829d813a8d7fe63cc5f658ea93321410f91f65f /llvm/lib/Analysis/ValueTracking.cpp
parenta0c9c75df216feb7299f2be6157c44b322573474 (diff)
downloadbcm5719-llvm-7c99f19d9f5919dd4809aa5a5c84f5ff7807aafd.tar.gz
bcm5719-llvm-7c99f19d9f5919dd4809aa5a5c84f5ff7807aafd.zip
Carve out a place in instcombine to put transformations which work knowing that their
result is non-zero. Implement an example optimization (PR9814), which allows us to transform: A / ((1 << B) >>u 2) into: A >>u (B-2) which we compile into: _divu3: ## @divu3 leal -2(%rsi), %ecx shrl %cl, %edi movl %edi, %eax ret instead of: _divu3: ## @divu3 movb %sil, %cl movl $1, %esi shll %cl, %esi shrl $2, %esi movl %edi, %eax xorl %edx, %edx divl %esi, %eax ret llvm-svn: 131860
Diffstat (limited to 'llvm/lib/Analysis/ValueTracking.cpp')
0 files changed, 0 insertions, 0 deletions
OpenPOWER on IntegriCloud