[llvm] [Mips] Fix atomic min/max generate mips4 instructions when compiling for mips2 (PR #159717)
Matt Arsenault via llvm-commits
llvm-commits at lists.llvm.org
Sun Sep 21 20:55:31 PDT 2025
================
@@ -12,6 +12,11 @@
; RUN: llc -mtriple=mips64-elf -O0 -mcpu=mips64r6 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPS64R6
; RUN: llc -mtriple=mips64el-elf -O0 -mcpu=mips64r2 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPS64EL
; RUN: llc -mtriple=mips64el-elf -O0 -mcpu=mips64r6 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPS64ELR6
+;
+; // mips2 does not test i16 and i8.
+; RUN: sed -e '/define.*@\(test_max_16\|test_umax_16\|test_min_16\|test_umin_16\)/,/^}$/d' \
+; RUN: -e '/define.*@\(test_max_8\|test_umax_8\|test_min_8\|test_umin_8\)/,/^}$/d' %s > %t.filtered.ll
+; RUN: llc -mtriple=mipsel-elf -O0 -mcpu=mips2 -verify-machineinstrs %t.filtered.ll -o - | FileCheck %s --check-prefix=MIPS2
----------------
arsenm wrote:
This is not maintainable. Do not do this. Even if you aren't bothering to support the sub-dword case, you should have test coverage for the error cases
https://github.com/llvm/llvm-project/pull/159717
More information about the llvm-commits
mailing list