[PATCH] D53310: [X86] Match (cmp (and (shr X, C), mask), 0) to BEXTR+TEST.
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 16 09:11:24 PDT 2018
craig.topper added inline comments.
================
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));
----------------
lebedev.ri wrote:
> Is this correct?
> We will always use `MVT::i32`, even for `X86::TEST64rr`?
> We shouldn't be using `CmpVT` here?
The TEST instruction returns flags not data. We always use MVT::i32 for the flags.
Repository:
rL LLVM
https://reviews.llvm.org/D53310
More information about the llvm-commits
mailing list