[PATCH] D52304: [X86][BMI1]: X86DAGToDAGISel: select BEXTR from x & ~(-1 << nbits) pattern
Roman Lebedev via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 22 01:07:13 PDT 2018
lebedev.ri added inline comments.
================
Comment at: lib/Target/X86/X86ISelDAGToDAG.cpp:2696
+ SDValue NBitsTrunc = NBits;
+ if (NBits->getSimpleValueType(0) != MVT::i8) {
+ NBitsTrunc = CurDAG->getNode(ISD::TRUNCATE, DL, MVT::i8, NBits);
----------------
craig.topper wrote:
> This can just be NBits.getSimpleValueType(). Using the -> is taking you to SDNode, but you already had SDValue. But can NBits ever not be i8? It came from a shift didn't it?
In *these* two patterns - yes, it came from shift.
But in the patterns c, d - it will not.
This was kind-of future-proofing, let's drop it.
Repository:
rL LLVM
https://reviews.llvm.org/D52304
More information about the llvm-commits
mailing list