summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorSimon Pilgrim <llvm-dev@redking.me.uk>2018-12-18 09:33:25 +0000
committerSimon Pilgrim <llvm-dev@redking.me.uk>2018-12-18 09:33:25 +0000
commitaf6fbbf18bb121d508d966b20cfc75cfb3aa54bd (patch)
tree56903de3a5807a4d69b87baa6200801dd3a0e706 /llvm/lib/CodeGen
parent856628f707f193acee7d620c38f76b22eb583e7f (diff)
downloadbcm5719-llvm-af6fbbf18bb121d508d966b20cfc75cfb3aa54bd.tar.gz
bcm5719-llvm-af6fbbf18bb121d508d966b20cfc75cfb3aa54bd.zip
[TargetLowering] Fallback from SimplifyDemandedVectorElts to SimplifyDemandedBits
For opcodes not covered by SimplifyDemandedVectorElts, SimplifyDemandedBits might be able to help now that it supports demanded elts as well. llvm-svn: 349466
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
index 8ac1a962a8e..4c551d5b231 100644
--- a/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp
@@ -1894,10 +1894,17 @@ bool TargetLowering::SimplifyDemandedVectorElts(
return true;
break;
default: {
- if (Op.getOpcode() >= ISD::BUILTIN_OP_END)
+ if (Op.getOpcode() >= ISD::BUILTIN_OP_END) {
if (SimplifyDemandedVectorEltsForTargetNode(Op, DemandedElts, KnownUndef,
KnownZero, TLO, Depth))
return true;
+ } else {
+ KnownBits Known;
+ APInt DemandedBits = APInt::getAllOnesValue(EltSizeInBits);
+ if (SimplifyDemandedBits(Op, DemandedBits, DemandedEltMask, Known, TLO,
+ Depth, AssumeSingleUse))
+ return true;
+ }
break;
}
}
OpenPOWER on IntegriCloud