[PATCH] D48491: [X86] Select BEXTR when there is only BMI1.

Roman Lebedev via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Sep 16 23:11:38 PDT 2018


lebedev.ri added a comment.

In https://reviews.llvm.org/D48491#1236394, @craig.topper wrote:

> Can we DAG combine to X86ISD::BEXTR for these cases? Then we can properly check one use of the inner parts of the pattern.


Do we care whether the *entire* old patter goes away, or just one more instruction?
But yes, should work, let's see.

> The other option might be to use PatFrags that check for one use like the existing srl_su fragment. My concern is that if the inner nodes of the patterns here have more uses, the emitted pattern won't completely remove the need for the inner node. So you'll end up emitting multiple instructions for this pattern and additional instructions for the remaining use of the inner node.




Repository:
  rL LLVM

https://reviews.llvm.org/D48491





More information about the llvm-commits mailing list