[all-commits] [llvm/llvm-project] e711a0: [MIPS] Fix missing ANDI optimization (#97689)

yingopq via All-commits all-commits at lists.llvm.org
Fri Aug 9 10:55:42 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: e711a0c80fdd318afe869b7ddc16053dd2066d66
      https://github.com/llvm/llvm-project/commit/e711a0c80fdd318afe869b7ddc16053dd2066d66
  Author: yingopq <115543042+yingopq at users.noreply.github.com>
  Date:   2024-08-09 (Fri, 09 Aug 2024)

  Changed paths:
    M llvm/lib/Target/Mips/Mips64InstrInfo.td
    M llvm/test/CodeGen/Mips/llvm-ir/and-srl.ll

  Log Message:
  -----------
  [MIPS] Fix missing ANDI optimization (#97689)

1. Add MipsPat to optimize (andi (srl (truncate i64 $1), x), y) to (andi
(truncate (dsrl i64 $1, x)), y).
2. Add MipsPat to optimize (ext (truncate i64 $1), x, y) to (truncate
(dext i64 $1, x, y)).

The assembly result is the same as gcc.

Fixes https://github.com/llvm/llvm-project/issues/42826



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