[X86][BMI1] X86DAGToDAGISel: select BEXTR from x & (-1 >> (32 - y)) pattern
authorRoman Lebedev <lebedev.ri@gmail.com>
Tue, 30 Oct 2018 11:12:34 +0000 (11:12 +0000)
committerRoman Lebedev <lebedev.ri@gmail.com>
Tue, 30 Oct 2018 11:12:34 +0000 (11:12 +0000)
commitb3a14208ac3cdb27588992a7c988b02c981c0586
treebb57b13abcec8295bfe89be55567650f1a4ba9a4
parent9ffca9b83c191d5fa190f52e275e7e4019668d65
[X86][BMI1] X86DAGToDAGISel: select BEXTR from x &  (-1 >> (32 - y)) pattern

Summary:
The final pattern.
There is no test changes:
* We are looking for the pattern with one-use of it's mask,
* If the mask is one-use, D48768 will unfold it into pattern d.
* Thus, the tests have extra-use on the mask.
* Thus, only the BMI2 BZHI can be tested, and it already worked.
* So there is no BMI1 test coverage, we just assume it works since it uses the same codepath.

Reviewers: craig.topper, RKSimon

Reviewed By: RKSimon

Subscribers: llvm-commits

Differential Revision: https://reviews.llvm.org/D53575

llvm-svn: 345584
llvm/lib/Target/X86/X86ISelDAGToDAG.cpp
llvm/lib/Target/X86/X86InstrInfo.td