Trivial continuation of D52304.
While this pattern is not canonical, we do select it in the BZHI case,
so this should not be any different.
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
I believe i will have to move BZHI selection from tablegen into here, due to https://reviews.llvm.org/D48768#inline-461084,
else we will have test coverage issues, and code duplication.
test/CodeGen/X86/extract-bits.ll | ||
---|---|---|
85 | Could we not do this? shll $8, %edx orl %esi, %edx bextrl %edx, %edi, %eax Or are there concerns about overflows etc? |
test/CodeGen/X86/extract-bits.ll | ||
---|---|---|
85 | That's the idea, there is a TODO in the code about it. I *think* it should be safe to do, *if* it was lshr, not ashr, since
|
I think you can use ISD::isAllOnesConstant