llvm-project
2108c623 - [X86] narrowBitOpRMW - add handling for single bit insertion patterns (#165742)

Commit
47 days ago
[X86] narrowBitOpRMW - add handling for single bit insertion patterns (#165742) Insertion of a single bit into a large integer is typically canonicalized to "(X & ~(1 << ShAmt)) | (InsertBit << ShAmt)", which can be simplified to modify the i32 block as a BTR followed by an OR((i32)InsertBit << (ShAmt % 32). We must ensure that the InsertBit is zero apart from the LSB so we can cheaply truncate it to work with the i32 block like the simpler BT patterns.
Author
Parents
Loading