OSDN Git Service

[InstCombine] Provide a way to calculate KnownZero/One for Add/Sub in SimplifyDemande...
authorCraig Topper <craig.topper@gmail.com>
Fri, 24 Mar 2017 16:56:51 +0000 (16:56 +0000)
committerCraig Topper <craig.topper@gmail.com>
Fri, 24 Mar 2017 16:56:51 +0000 (16:56 +0000)
commitbab6d5ee26b964938ed0ead596f7892561d772b1
tree98d06d7057df97806b32632419f41a480b9fe615
parent5792952b40c2e87d681561c53e5f8edfc3cb04ab
[InstCombine] Provide a way to calculate KnownZero/One for Add/Sub in SimplifyDemandedUseBits without recursing into ComputeKnownBits

SimplifyDemandedUseBits for Add/Sub already recursed down LHS and RHS for simplifying bits. If that didn't provide any simplifications we fall back to calling computeKnownBits which will recurse again. Instead just take the known bits for LHS and RHS we already have and call into a new function in ValueTracking that can calculate the known bits given the LHS/RHS bits.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@298711 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Analysis/ValueTracking.h
lib/Analysis/ValueTracking.cpp
lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp