[PATCH] D122084: [X86] combineAddOrSubToADCOrSBB - Fold ADD/SUB + (AND(SRL(X,Y),1) -> ADC/SBB+BT(X,Y)

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 19 14:40:07 PDT 2022


RKSimon created this revision.
RKSimon added reviewers: pengfei, spatel, craig.topper, lebedev.ri.
Herald added a subscriber: hiraditya.
Herald added a project: All.
RKSimon requested review of this revision.
Herald added a project: LLVM.

As suggested on PR35908, if we are adding/subtracting an extracted bit, attempt to use BT instead to fold the op and use a ADC/SBB op.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D122084

Files:
  llvm/lib/Target/X86/X86ISelLowering.cpp
  llvm/test/CodeGen/X86/add-sub-bool.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D122084.416740.patch
Type: text/x-patch
Size: 14306 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220319/6e0809d1/attachment.bin>


More information about the llvm-commits mailing list