(xor X, SignBit) == (add X, SignBit). For atomics whose result is
used, the add option is preferable because of the xadd instruction
which allows us to avoid either a CAS loop or a btc; setcc; shl.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
32412 | While you're here - please can you add a m_MinSignedValue equivalent to the existing m_MaxSignedValue matcher? |
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
32412 | Or just use m_SignMask? |
Comment Actions
for m_SignMask()
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
32412 | used m_SignMask. Can add m_MinSignedValue if you want, but prefer it in another patch (that I can then base this one on). LMK if you think it would be useful. |
Comment Actions
LGTM
llvm/lib/Target/X86/X86ISelLowering.cpp | ||
---|---|---|
32412 | m_SignMask is fine - in this case it matches the description better. |
While you're here - please can you add a m_MinSignedValue equivalent to the existing m_MaxSignedValue matcher?