diff options
author | Pete Cooper <peter_cooper@apple.com> | 2012-07-26 22:37:04 +0000 |
---|---|---|
committer | Pete Cooper <peter_cooper@apple.com> | 2012-07-26 22:37:04 +0000 |
commit | 1121c786fc24a4a8ce6c778cb9b5acdfa9006ffb (patch) | |
tree | f3441bbcbcb0ebc8c0afcaa7ccea734e26b98433 /lib/Transforms | |
parent | 79ad138a3341f2ac8121208db6559438b13b5a69 (diff) |
Teach SimplifyDemandedBits how to look through fpext and fptrunc to simplify their operand
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@160823 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r-- | lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp index 125c74a89a..46ba83b651 100644 --- a/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp +++ b/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp @@ -1074,6 +1074,12 @@ Value *InstCombiner::SimplifyDemandedVectorElts(Value *V, APInt DemandedElts, // like undef&0. The result is known zero, not undef. UndefElts &= UndefElts2; break; + case Instruction::FPTrunc: + case Instruction::FPExt: + TmpV = SimplifyDemandedVectorElts(I->getOperand(0), DemandedElts, + UndefElts, Depth+1); + if (TmpV) { I->setOperand(0, TmpV); MadeChange = true; } + break; case Instruction::Call: { IntrinsicInst *II = dyn_cast<IntrinsicInst>(I); |