[all-commits] [llvm/llvm-project] 3dc5b5: [RISCV] Improve legalization of i32 UADDO/USUBO on...

Craig Topper via All-commits all-commits at lists.llvm.org
Mon Mar 15 09:30:51 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3dc5b533e093ee5df92b3c11ee2150869e83b8a6
      https://github.com/llvm/llvm-project/commit/3dc5b533e093ee5df92b3c11ee2150869e83b8a6
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-03-15 (Mon, 15 Mar 2021)

  Changed paths:
    M llvm/lib/Target/RISCV/RISCVISelLowering.cpp
    M llvm/test/CodeGen/RISCV/xaluo.ll

  Log Message:
  -----------
  [RISCV] Improve legalization of i32 UADDO/USUBO on RV64.

The default legalization uses zero extends that require pair of shifts
on RISCV. Instead we can take advantage of the fact that unsigned
compares work equally well on sign extended inputs. This allows
us to use addw/subw and sext.w.

Reviewed By: luismarques

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




More information about the All-commits mailing list