[all-commits] [llvm/llvm-project] de1a42: [GISel][RISCV][AArch64] Support legalizing G_SCMP/...

Craig Topper via All-commits all-commits at lists.llvm.org
Sun Dec 15 20:47:39 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: de1a423c2356d2040cab74e657ed024bf9ce8517
      https://github.com/llvm/llvm-project/commit/de1a423c2356d2040cab74e657ed024bf9ce8517
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-12-15 (Sun, 15 Dec 2024)

  Changed paths:
    M llvm/lib/CodeGen/GlobalISel/LegalizerHelper.cpp
    M llvm/test/CodeGen/AArch64/GlobalISel/legalize-threeway-cmp.mir
    M llvm/test/CodeGen/AArch64/scmp.ll
    M llvm/test/CodeGen/AArch64/ucmp.ll
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-threeway-cmp-rv32.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/legalizer/legalize-threeway-cmp-rv64.mir
    M llvm/test/CodeGen/RISCV/GlobalISel/scmp.ll
    M llvm/test/CodeGen/RISCV/GlobalISel/ucmp.ll

  Log Message:
  -----------
  [GISel][RISCV][AArch64] Support legalizing G_SCMP/G_UCMP to sub(isgt,islt). (#119265)

Convert the LLT to EVT and call
TargetLowering::shouldExpandCmpUsingSelects to determine if we should do
this.

We don't have a getSetccResultType, so I'm boolean extending the
compares to the result type and using that. If the compares legalize to
the same type, these extends will get removed. Unfortunately, if the
compares legalize to a different type, we end up with truncates or
extends that might not be optimally placed.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list