[all-commits] [llvm/llvm-project] 307d12: [LegalizeTypes][RISCV][LoongArch] Optimize promoti...

Craig Topper via All-commits all-commits at lists.llvm.org
Wed Jul 31 17:18:49 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 307d1249ea635a78fcd347a65ddaa395cf64130e
      https://github.com/llvm/llvm-project/commit/307d1249ea635a78fcd347a65ddaa395cf64130e
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2024-07-31 (Wed, 31 Jul 2024)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp
    M llvm/test/CodeGen/LoongArch/ucmp.ll
    M llvm/test/CodeGen/RISCV/ucmp.ll

  Log Message:
  -----------
  [LegalizeTypes][RISCV][LoongArch] Optimize promotion of ucmp. (#101366)

ucmp can be promoted with either sext or zext. RISC-V and LoongArch
prefer sext for promoting i32 to i64 unless the inputs are known to be
zero extended already.

This patch uses the existing SExtOrZExtPromotedOperands function that is
used by SETCC promotion to intelligently handle this.



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