summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86
diff options
context:
space:
mode:
authorCraig Topper <craig.topper@intel.com>2019-03-27 02:08:03 +0000
committerCraig Topper <craig.topper@intel.com>2019-03-27 02:08:03 +0000
commit22387a56fe326e0192ff81835a7414549c3aaae0 (patch)
tree0c14caff3940e7ea4ee2bf0882d5c5c07b7a8ca3 /llvm/lib/Target/X86
parentd0050d1b8bae9256ebaecd4b6b94877dfa3e7719 (diff)
downloadbcm5719-llvm-22387a56fe326e0192ff81835a7414549c3aaae0.tar.gz
bcm5719-llvm-22387a56fe326e0192ff81835a7414549c3aaae0.zip
[X86] Simplify some code in matchBitExtract by using ANY_EXTEND.
We were manually outputting the code we would get from selecting ANY_EXTEND. We can save some code by just letting an ANY_EXTEND go through isel on its own. llvm-svn: 357045
Diffstat (limited to 'llvm/lib/Target/X86')
-rw-r--r--llvm/lib/Target/X86/X86ISelDAGToDAG.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
index 5e2b90ff881..f5483ef8803 100644
--- a/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
+++ b/llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
@@ -3025,11 +3025,7 @@ bool X86DAGToDAGISel::matchBitExtract(SDNode *Node) {
// Great, just emit the the BZHI..
if (XVT != MVT::i32) {
// But have to place the bit count into the wide-enough register first.
- SDValue ImplDef = SDValue(
- CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, XVT), 0);
- insertDAGNode(*CurDAG, SDValue(Node, 0), ImplDef);
- NBits = CurDAG->getTargetInsertSubreg(X86::sub_32bit, DL, XVT, ImplDef,
- NBits);
+ NBits = CurDAG->getNode(ISD::ANY_EXTEND, DL, XVT, NBits);
insertDAGNode(*CurDAG, SDValue(Node, 0), NBits);
}
@@ -3072,11 +3068,7 @@ bool X86DAGToDAGISel::matchBitExtract(SDNode *Node) {
// But have to place the 'control' into the wide-enough register first.
if (XVT != MVT::i32) {
- SDValue ImplDef =
- SDValue(CurDAG->getMachineNode(TargetOpcode::IMPLICIT_DEF, DL, XVT), 0);
- insertDAGNode(*CurDAG, SDValue(Node, 0), ImplDef);
- Control = CurDAG->getTargetInsertSubreg(X86::sub_32bit, DL, XVT, ImplDef,
- Control);
+ Control = CurDAG->getNode(ISD::ANY_EXTEND, DL, XVT, Control);
insertDAGNode(*CurDAG, SDValue(Node, 0), Control);
}
OpenPOWER on IntegriCloud