[PATCH] D52348: [X86][BMI1]: X86DAGToDAGISel: select BEXTR from x & ((1 << nbits) + (-1)) pattern

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Oct 22 04:10:55 PDT 2018


RKSimon added inline comments.


================
Comment at: test/CodeGen/X86/extract-bits.ll:85
+; X64-BMI1NOTBM-NEXT:    shll $8, %edx
+; X64-BMI1NOTBM-NEXT:    bextrl %edx, %edi, %eax
 ; X64-BMI1NOTBM-NEXT:    retq
----------------
Could we not do this?
```
shll $8, %edx
orl %esi, %edx
bextrl %edx, %edi, %eax
```
Or are there concerns about overflows etc?


Repository:
  rL LLVM

https://reviews.llvm.org/D52348





More information about the llvm-commits mailing list