[all-commits] [llvm/llvm-project] af1b7e: [TargetLowering] Move a few hasOneUse() tests late...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Fri Jul 29 06:20:54 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: af1b7ebcdf1a718af3bc066e28f51209a7e929fc
      https://github.com/llvm/llvm-project/commit/af1b7ebcdf1a718af3bc066e28f51209a7e929fc
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/TargetLowering.cpp

  Log Message:
  -----------
  [TargetLowering] Move a few hasOneUse() tests later to reduce unnecessary computations. NFC.

Many of these cases, an early-out on the much cheaper getOpcode() check will avoid us needing to call hasOneUse() entirely.


  Commit: c9737b6f1818056de3a69e43150d501ac0ee2851
      https://github.com/llvm/llvm-project/commit/c9737b6f1818056de3a69e43150d501ac0ee2851
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/test/CodeGen/X86/combine-bitselect.ll

  Log Message:
  -----------
  [X86] Add regression test case from rG057db2002bb3

When constant folding "ANDNP(C,X) -> AND(~C,X)" we hit cases such as this where we interfered with the "OR(AND(X,C),AND(Y,~C)) -> OR(AND(X,C),ANDNP(C,Y))" fold in canonicalizeBitSelect


Compare: https://github.com/llvm/llvm-project/compare/ef906f287e7d...c9737b6f1818


More information about the All-commits mailing list