summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2012-07-26 22:37:04 +0000
committerPete Cooper <peter_cooper@apple.com>2012-07-26 22:37:04 +0000
commite807e45bffdb05eb982e183583bcff1f51d52b7b (patch)
tree740bb2576828a27e6c4ceb918c942b0eab2799af /llvm/lib
parentecc928c89b119acb6a0e4ff0dd8624c22e120fd9 (diff)
downloadbcm5719-llvm-e807e45bffdb05eb982e183583bcff1f51d52b7b.tar.gz
bcm5719-llvm-e807e45bffdb05eb982e183583bcff1f51d52b7b.zip
Teach SimplifyDemandedBits how to look through fpext and fptrunc to simplify their operand
llvm-svn: 160823
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp b/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
index 125c74a89a1..46ba83b6513 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineSimplifyDemanded.cpp
+++ b/llvm/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);
OpenPOWER on IntegriCloud