[all-commits] [llvm/llvm-project] efd5ac: [LegalizeTypes][NVPTX] Remove extra compare from f...

Craig Topper via All-commits all-commits at lists.llvm.org
Tue Sep 13 09:08:15 PDT 2022

  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: efd5acf1201f593a70937b140da72e49b7d0e7b3
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2022-09-13 (Tue, 13 Sep 2022)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/test/CodeGen/NVPTX/add-sub-128bit.ll

  Log Message:
  [LegalizeTypes][NVPTX] Remove extra compare from fallback code for ISD::ADD in ExpandIntRes_ADDSUB.

This is the ultimate fallback code if UADDO isn't supported.

If the target uses 0/1 we used one compare, but if the target doesn't
use 0/1 we emitted two compares. Regardless of boolean constants we
should only need to check that the Result is less than one of the
original operands. So we only need one compare.

Reviewed By: spatel

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

More information about the All-commits mailing list