[all-commits] [llvm/llvm-project] d78fdf: [LegalizeTypes] Further limit expansion of CTTZ du...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Nov 17 15:28:26 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d78fdf111dda26307e88d16f5f5d1411f3bd7e61
      https://github.com/llvm/llvm-project/commit/d78fdf111dda26307e88d16f5f5d1411f3bd7e61
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-11-17 (Wed, 17 Nov 2021)

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

  Log Message:
  -----------
  [LegalizeTypes] Further limit expansion of CTTZ during type promotion.

Don't expand CTTZ if CTPOP or CTLZ is supported on the promoted type.
We have special handling for CTTZ expansion to use those ops with a
small conversion. The setup for that doesn't generate extra code or
large constants so we don't gain anything from expanding early and we
make CTTZ_ZERO_UNDEF codegen worse.

Follow up from post commit feedback on D112268. We don't seem to have
any in tree tests that care about this.




More information about the All-commits mailing list