[PATCH] D53310: [X86] Match (cmp (and (shr X, C), mask), 0) to BEXTR+TEST.
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 00:17:26 PDT 2018
lebedev.ri added inline comments.
================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:457
bool foldLoadStoreIntoMemOperand(SDNode *Node);
- bool matchBEXTRFromAndImm(SDNode *Node);
+ MachineSDNode *matchBEXTRFromAndImm(SDNode *Node);
bool matchBEXTR(SDNode *Node);
----------------
Can probably be a separate preparatory cleanup commit.
================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:3564
+ SDValue BEXTR = SDValue(NewNode, 0);
+ NewNode = CurDAG->getMachineNode(TestOpc, dl, MVT::i32, BEXTR, BEXTR);
+ ReplaceUses(SDValue(Node, 0), SDValue(NewNode, 0));
----------------
Is this correct?
We will always use `MVT::i32`, even for `X86::TEST64rr`?
We shouldn't be using `CmpVT` here?
Repository:
rL LLVM
https://reviews.llvm.org/D53310
More information about the llvm-commits
mailing list