[all-commits] [llvm/llvm-project] 81569f: [X86] combineAddOrSubToADCOrSBB - Fold ADD/SUB + (...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Mon Mar 21 03:57:34 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 81569f5b6ef531a48023f28133481262ee1509a3
      https://github.com/llvm/llvm-project/commit/81569f5b6ef531a48023f28133481262ee1509a3
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-03-21 (Mon, 21 Mar 2022)

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

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

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.

Differential Revision: https://reviews.llvm.org/D122084




More information about the All-commits mailing list