; RUN: llc -march=mips -O0 -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPSR6
; RUN: llc -march=mips -O0 -mcpu=mips32r2 -mattr=+micromips -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MM
; RUN: llc -march=mips -O0 -mcpu=mips32r6 -mattr=+micromips -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MMR6
-; RUN: llc -march=mipsel -O0 -mcpu=mips32 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPS32
; RUN: llc -march=mipsel -O0 -mcpu=mips32r2 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPSEL
; RUN: llc -march=mipsel -O0 -mcpu=mips32r6 -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MIPSELR6
; RUN: llc -march=mipsel -O0 -mcpu=mips32r2 -mattr=+micromips -verify-machineinstrs %s -o - | FileCheck %s --check-prefix=MMEL
; MMR6-NEXT: sync
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_max_32:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: $BB0_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($4)
-; MIPS32-NEXT: slt $3, $2, $5
-; MIPS32-NEXT: move $1, $2
-; MIPS32-NEXT: movn $1, $5, $3
-; MIPS32-NEXT: sc $1, 0($4)
-; MIPS32-NEXT: beqz $1, $BB0_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_max_32:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: sync
; MMR6-NEXT: sync
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_min_32:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: $BB1_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($4)
-; MIPS32-NEXT: slt $3, $2, $5
-; MIPS32-NEXT: move $1, $2
-; MIPS32-NEXT: movz $1, $5, $3
-; MIPS32-NEXT: sc $1, 0($4)
-; MIPS32-NEXT: beqz $1, $BB1_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_min_32:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: sync
; MMR6-NEXT: sync
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umax_32:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: $BB2_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($4)
-; MIPS32-NEXT: sltu $3, $2, $5
-; MIPS32-NEXT: move $1, $2
-; MIPS32-NEXT: movn $1, $5, $3
-; MIPS32-NEXT: sc $1, 0($4)
-; MIPS32-NEXT: beqz $1, $BB2_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_umax_32:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: sync
; MMR6-NEXT: sync
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umin_32:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: $BB3_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($4)
-; MIPS32-NEXT: sltu $3, $2, $5
-; MIPS32-NEXT: move $1, $2
-; MIPS32-NEXT: movz $1, $5, $3
-; MIPS32-NEXT: sc $1, 0($4)
-; MIPS32-NEXT: beqz $1, $BB3_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_umin_32:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: sync
; MMR6-NEXT: sync
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
-;
-; MIPS32-LABEL: test_max_16:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 65535
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB4_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: srav $2, $2, $10
-; MIPS32-NEXT: srav $7, $7, $10
-; MIPS32-NEXT: sll $2, $2, 16
-; MIPS32-NEXT: sra $2, $2, 16
-; MIPS32-NEXT: sll $7, $7, 16
-; MIPS32-NEXT: sra $7, $7, 16
-; MIPS32-NEXT: slt $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movn $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB4_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-
;
; MIPSEL-LABEL: test_max_16:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: $BB4_1: # %entry
; MIPSEL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSEL-NEXT: ll $2, 0($6)
-; MIPSEL-NEXT: srav $2, $2, $10
-; MIPSEL-NEXT: srav $7, $7, $10
-; MIPSEL-NEXT: seh $2, $2
-; MIPSEL-NEXT: seh $7, $7
+; MIPSEL-NEXT: and $2, $2, $8
+; MIPSEL-NEXT: and $7, $7, $8
; MIPSEL-NEXT: slt $5, $2, $7
; MIPSEL-NEXT: move $3, $2
; MIPSEL-NEXT: movn $3, $7, $5
; MIPSELR6-NEXT: $BB4_1: # %entry
; MIPSELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSELR6-NEXT: ll $2, 0($6)
-; MIPSELR6-NEXT: srav $2, $2, $10
-; MIPSELR6-NEXT: srav $7, $7, $10
-; MIPSELR6-NEXT: seh $2, $2
-; MIPSELR6-NEXT: seh $7, $7
+; MIPSELR6-NEXT: and $2, $2, $8
+; MIPSELR6-NEXT: and $7, $7, $8
; MIPSELR6-NEXT: slt $5, $2, $7
; MIPSELR6-NEXT: seleqz $3, $2, $5
; MIPSELR6-NEXT: selnez $5, $7, $5
; MMEL-NEXT: $BB4_1: # %entry
; MMEL-NEXT: # =>This Inner Loop Header: Depth=1
; MMEL-NEXT: ll $2, 0($6)
-; MMEL-NEXT: srav $2, $2, $10
-; MMEL-NEXT: srav $7, $7, $10
-; MMEL-NEXT: seh $2, $2
-; MMEL-NEXT: seh $7, $7
+; MMEL-NEXT: and $2, $2, $8
+; MMEL-NEXT: and $7, $7, $8
; MMEL-NEXT: slt $5, $2, $7
; MMEL-NEXT: or $3, $2, $zero
; MMEL-NEXT: movn $3, $7, $5
; MMELR6-NEXT: $BB4_1: # %entry
; MMELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MMELR6-NEXT: ll $2, 0($6)
-; MMELR6-NEXT: srav $2, $2, $10
-; MMELR6-NEXT: srav $7, $7, $10
-; MMELR6-NEXT: seh $2, $2
-; MMELR6-NEXT: seh $7, $7
+; MMELR6-NEXT: and $2, $2, $8
+; MMELR6-NEXT: and $7, $7, $8
; MMELR6-NEXT: slt $5, $2, $7
; MMELR6-NEXT: seleqz $3, $2, $5
; MMELR6-NEXT: selnez $5, $7, $5
; MIPS64EL-NEXT: .LBB4_1: # %entry
; MIPS64EL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64EL-NEXT: ll $2, 0($6)
-; MIPS64EL-NEXT: srav $2, $2, $10
-; MIPS64EL-NEXT: srav $7, $7, $10
-; MIPS64EL-NEXT: seh $2, $2
-; MIPS64EL-NEXT: seh $7, $7
+; MIPS64EL-NEXT: and $2, $2, $8
+; MIPS64EL-NEXT: and $7, $7, $8
; MIPS64EL-NEXT: slt $5, $2, $7
; MIPS64EL-NEXT: move $3, $2
; MIPS64EL-NEXT: movn $3, $7, $5
; MIPS64ELR6-NEXT: .LBB4_1: # %entry
; MIPS64ELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64ELR6-NEXT: ll $2, 0($6)
-; MIPS64ELR6-NEXT: srav $2, $2, $10
-; MIPS64ELR6-NEXT: srav $7, $7, $10
-; MIPS64ELR6-NEXT: seh $2, $2
-; MIPS64ELR6-NEXT: seh $7, $7
+; MIPS64ELR6-NEXT: and $2, $2, $8
+; MIPS64ELR6-NEXT: and $7, $7, $8
; MIPS64ELR6-NEXT: slt $5, $2, $7
; MIPS64ELR6-NEXT: seleqz $3, $2, $5
; MIPS64ELR6-NEXT: selnez $5, $7, $5
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_min_16:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 65535
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB5_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: srav $2, $2, $10
-; MIPS32-NEXT: srav $7, $7, $10
-; MIPS32-NEXT: sll $2, $2, 16
-; MIPS32-NEXT: sra $2, $2, 16
-; MIPS32-NEXT: sll $7, $7, 16
-; MIPS32-NEXT: sra $7, $7, 16
-; MIPS32-NEXT: slt $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movz $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB5_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_min_16:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MIPSEL-NEXT: $BB5_1: # %entry
; MIPSEL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSEL-NEXT: ll $2, 0($6)
-; MIPSEL-NEXT: srav $2, $2, $10
-; MIPSEL-NEXT: srav $7, $7, $10
-; MIPSEL-NEXT: seh $2, $2
-; MIPSEL-NEXT: seh $7, $7
+; MIPSEL-NEXT: and $2, $2, $8
+; MIPSEL-NEXT: and $7, $7, $8
; MIPSEL-NEXT: slt $5, $2, $7
; MIPSEL-NEXT: move $3, $2
; MIPSEL-NEXT: movz $3, $7, $5
; MIPSELR6-NEXT: $BB5_1: # %entry
; MIPSELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSELR6-NEXT: ll $2, 0($6)
-; MIPSELR6-NEXT: srav $2, $2, $10
-; MIPSELR6-NEXT: srav $7, $7, $10
-; MIPSELR6-NEXT: seh $2, $2
-; MIPSELR6-NEXT: seh $7, $7
+; MIPSELR6-NEXT: and $2, $2, $8
+; MIPSELR6-NEXT: and $7, $7, $8
; MIPSELR6-NEXT: slt $5, $2, $7
; MIPSELR6-NEXT: selnez $3, $2, $5
; MIPSELR6-NEXT: seleqz $5, $7, $5
; MMEL-NEXT: $BB5_1: # %entry
; MMEL-NEXT: # =>This Inner Loop Header: Depth=1
; MMEL-NEXT: ll $2, 0($6)
-; MMEL-NEXT: srav $2, $2, $10
-; MMEL-NEXT: srav $7, $7, $10
-; MMEL-NEXT: seh $2, $2
-; MMEL-NEXT: seh $7, $7
+; MMEL-NEXT: and $2, $2, $8
+; MMEL-NEXT: and $7, $7, $8
; MMEL-NEXT: slt $5, $2, $7
; MMEL-NEXT: or $3, $2, $zero
; MMEL-NEXT: movz $3, $7, $5
; MMELR6-NEXT: $BB5_1: # %entry
; MMELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MMELR6-NEXT: ll $2, 0($6)
-; MMELR6-NEXT: srav $2, $2, $10
-; MMELR6-NEXT: srav $7, $7, $10
-; MMELR6-NEXT: seh $2, $2
-; MMELR6-NEXT: seh $7, $7
+; MMELR6-NEXT: and $2, $2, $8
+; MMELR6-NEXT: and $7, $7, $8
; MMELR6-NEXT: slt $5, $2, $7
; MMELR6-NEXT: selnez $3, $2, $5
; MMELR6-NEXT: seleqz $5, $7, $5
; MIPS64EL-NEXT: .LBB5_1: # %entry
; MIPS64EL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64EL-NEXT: ll $2, 0($6)
-; MIPS64EL-NEXT: srav $2, $2, $10
-; MIPS64EL-NEXT: srav $7, $7, $10
-; MIPS64EL-NEXT: seh $2, $2
-; MIPS64EL-NEXT: seh $7, $7
+; MIPS64EL-NEXT: and $2, $2, $8
+; MIPS64EL-NEXT: and $7, $7, $8
; MIPS64EL-NEXT: slt $5, $2, $7
; MIPS64EL-NEXT: move $3, $2
; MIPS64EL-NEXT: movz $3, $7, $5
; MIPS64ELR6-NEXT: .LBB5_1: # %entry
; MIPS64ELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64ELR6-NEXT: ll $2, 0($6)
-; MIPS64ELR6-NEXT: srav $2, $2, $10
-; MIPS64ELR6-NEXT: srav $7, $7, $10
-; MIPS64ELR6-NEXT: seh $2, $2
-; MIPS64ELR6-NEXT: seh $7, $7
+; MIPS64ELR6-NEXT: and $2, $2, $8
+; MIPS64ELR6-NEXT: and $7, $7, $8
; MIPS64ELR6-NEXT: slt $5, $2, $7
; MIPS64ELR6-NEXT: selnez $3, $2, $5
; MIPS64ELR6-NEXT: seleqz $5, $7, $5
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umax_16:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 65535
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB6_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: and $2, $2, $8
-; MIPS32-NEXT: and $7, $7, $8
-; MIPS32-NEXT: sltu $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movn $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB6_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_umax_16:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umin_16:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 65535
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB7_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: and $2, $2, $8
-; MIPS32-NEXT: and $7, $7, $8
-; MIPS32-NEXT: sltu $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movz $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB7_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
-;
; MIPSEL-LABEL: test_umin_16:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MIPS-NEXT: # %bb.2: # %entry
; MIPS-NEXT: and $1, $2, $8
; MIPS-NEXT: srlv $1, $1, $10
-; MIPS-NEXT: seb $1, $1
+; MIPS-NEXT: seh $1, $1
; MIPS-NEXT: # %bb.3: # %entry
; MIPS-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPS-NEXT: # %bb.4: # %entry
; MIPSR6-NEXT: # %bb.2: # %entry
; MIPSR6-NEXT: and $1, $2, $8
; MIPSR6-NEXT: srlv $1, $1, $10
-; MIPSR6-NEXT: seb $1, $1
+; MIPSR6-NEXT: seh $1, $1
; MIPSR6-NEXT: # %bb.3: # %entry
; MIPSR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSR6-NEXT: # %bb.4: # %entry
; MM-NEXT: # %bb.2: # %entry
; MM-NEXT: and $1, $2, $8
; MM-NEXT: srlv $1, $1, $10
-; MM-NEXT: seb $1, $1
+; MM-NEXT: seh $1, $1
; MM-NEXT: # %bb.3: # %entry
; MM-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MM-NEXT: # %bb.4: # %entry
; MMR6-NEXT: # %bb.2: # %entry
; MMR6-NEXT: and $1, $2, $8
; MMR6-NEXT: srlv $1, $1, $10
-; MMR6-NEXT: seb $1, $1
+; MMR6-NEXT: seh $1, $1
; MMR6-NEXT: # %bb.3: # %entry
; MMR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMR6-NEXT: # %bb.4: # %entry
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_max_8:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 255
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB8_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: srav $2, $2, $10
-; MIPS32-NEXT: srav $7, $7, $10
-; MIPS32-NEXT: sll $2, $2, 24
-; MIPS32-NEXT: sra $2, $2, 24
-; MIPS32-NEXT: sll $7, $7, 24
-; MIPS32-NEXT: sra $7, $7, 24
-; MIPS32-NEXT: slt $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movn $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB8_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 24
-; MIPS32-NEXT: sra $1, $1, 24
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_max_8:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MIPSEL-NEXT: $BB8_1: # %entry
; MIPSEL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSEL-NEXT: ll $2, 0($6)
-; MIPSEL-NEXT: srav $2, $2, $10
-; MIPSEL-NEXT: srav $7, $7, $10
-; MIPSEL-NEXT: seb $2, $2
-; MIPSEL-NEXT: seb $7, $7
+; MIPSEL-NEXT: and $2, $2, $8
+; MIPSEL-NEXT: and $7, $7, $8
; MIPSEL-NEXT: slt $5, $2, $7
; MIPSEL-NEXT: move $3, $2
; MIPSEL-NEXT: movn $3, $7, $5
; MIPSEL-NEXT: # %bb.2: # %entry
; MIPSEL-NEXT: and $1, $2, $8
; MIPSEL-NEXT: srlv $1, $1, $10
-; MIPSEL-NEXT: seb $1, $1
+; MIPSEL-NEXT: seh $1, $1
; MIPSEL-NEXT: # %bb.3: # %entry
; MIPSEL-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSEL-NEXT: # %bb.4: # %entry
; MIPSELR6-NEXT: $BB8_1: # %entry
; MIPSELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSELR6-NEXT: ll $2, 0($6)
-; MIPSELR6-NEXT: srav $2, $2, $10
-; MIPSELR6-NEXT: srav $7, $7, $10
-; MIPSELR6-NEXT: seb $2, $2
-; MIPSELR6-NEXT: seb $7, $7
+; MIPSELR6-NEXT: and $2, $2, $8
+; MIPSELR6-NEXT: and $7, $7, $8
; MIPSELR6-NEXT: slt $5, $2, $7
; MIPSELR6-NEXT: seleqz $3, $2, $5
; MIPSELR6-NEXT: selnez $5, $7, $5
; MIPSELR6-NEXT: # %bb.2: # %entry
; MIPSELR6-NEXT: and $1, $2, $8
; MIPSELR6-NEXT: srlv $1, $1, $10
-; MIPSELR6-NEXT: seb $1, $1
+; MIPSELR6-NEXT: seh $1, $1
; MIPSELR6-NEXT: # %bb.3: # %entry
; MIPSELR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSELR6-NEXT: # %bb.4: # %entry
; MMEL-NEXT: $BB8_1: # %entry
; MMEL-NEXT: # =>This Inner Loop Header: Depth=1
; MMEL-NEXT: ll $2, 0($6)
-; MMEL-NEXT: srav $2, $2, $10
-; MMEL-NEXT: srav $7, $7, $10
-; MMEL-NEXT: seb $2, $2
-; MMEL-NEXT: seb $7, $7
+; MMEL-NEXT: and $2, $2, $8
+; MMEL-NEXT: and $7, $7, $8
; MMEL-NEXT: slt $5, $2, $7
; MMEL-NEXT: or $3, $2, $zero
; MMEL-NEXT: movn $3, $7, $5
; MMEL-NEXT: # %bb.2: # %entry
; MMEL-NEXT: and $1, $2, $8
; MMEL-NEXT: srlv $1, $1, $10
-; MMEL-NEXT: seb $1, $1
+; MMEL-NEXT: seh $1, $1
; MMEL-NEXT: # %bb.3: # %entry
; MMEL-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMEL-NEXT: # %bb.4: # %entry
; MMELR6-NEXT: $BB8_1: # %entry
; MMELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MMELR6-NEXT: ll $2, 0($6)
-; MMELR6-NEXT: srav $2, $2, $10
-; MMELR6-NEXT: srav $7, $7, $10
-; MMELR6-NEXT: seb $2, $2
-; MMELR6-NEXT: seb $7, $7
+; MMELR6-NEXT: and $2, $2, $8
+; MMELR6-NEXT: and $7, $7, $8
; MMELR6-NEXT: slt $5, $2, $7
; MMELR6-NEXT: seleqz $3, $2, $5
; MMELR6-NEXT: selnez $5, $7, $5
; MMELR6-NEXT: # %bb.2: # %entry
; MMELR6-NEXT: and $1, $2, $8
; MMELR6-NEXT: srlv $1, $1, $10
-; MMELR6-NEXT: seb $1, $1
+; MMELR6-NEXT: seh $1, $1
; MMELR6-NEXT: # %bb.3: # %entry
; MMELR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMELR6-NEXT: # %bb.4: # %entry
; MIPS64-NEXT: # %bb.2: # %entry
; MIPS64-NEXT: and $1, $2, $8
; MIPS64-NEXT: srlv $1, $1, $10
-; MIPS64-NEXT: seb $1, $1
+; MIPS64-NEXT: seh $1, $1
; MIPS64-NEXT: # %bb.3: # %entry
; MIPS64-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64-NEXT: # %bb.4: # %entry
; MIPS64R6-NEXT: # %bb.2: # %entry
; MIPS64R6-NEXT: and $1, $2, $8
; MIPS64R6-NEXT: srlv $1, $1, $10
-; MIPS64R6-NEXT: seb $1, $1
+; MIPS64R6-NEXT: seh $1, $1
; MIPS64R6-NEXT: # %bb.3: # %entry
; MIPS64R6-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64R6-NEXT: # %bb.4: # %entry
; MIPS64EL-NEXT: .LBB8_1: # %entry
; MIPS64EL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64EL-NEXT: ll $2, 0($6)
-; MIPS64EL-NEXT: srav $2, $2, $10
-; MIPS64EL-NEXT: srav $7, $7, $10
-; MIPS64EL-NEXT: seb $2, $2
-; MIPS64EL-NEXT: seb $7, $7
+; MIPS64EL-NEXT: and $2, $2, $8
+; MIPS64EL-NEXT: and $7, $7, $8
; MIPS64EL-NEXT: slt $5, $2, $7
; MIPS64EL-NEXT: move $3, $2
; MIPS64EL-NEXT: movn $3, $7, $5
; MIPS64EL-NEXT: # %bb.2: # %entry
; MIPS64EL-NEXT: and $1, $2, $8
; MIPS64EL-NEXT: srlv $1, $1, $10
-; MIPS64EL-NEXT: seb $1, $1
+; MIPS64EL-NEXT: seh $1, $1
; MIPS64EL-NEXT: # %bb.3: # %entry
; MIPS64EL-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64EL-NEXT: # %bb.4: # %entry
; MIPS64ELR6-NEXT: .LBB8_1: # %entry
; MIPS64ELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64ELR6-NEXT: ll $2, 0($6)
-; MIPS64ELR6-NEXT: srav $2, $2, $10
-; MIPS64ELR6-NEXT: srav $7, $7, $10
-; MIPS64ELR6-NEXT: seb $2, $2
-; MIPS64ELR6-NEXT: seb $7, $7
+; MIPS64ELR6-NEXT: and $2, $2, $8
+; MIPS64ELR6-NEXT: and $7, $7, $8
; MIPS64ELR6-NEXT: slt $5, $2, $7
; MIPS64ELR6-NEXT: seleqz $3, $2, $5
; MIPS64ELR6-NEXT: selnez $5, $7, $5
; MIPS64ELR6-NEXT: # %bb.2: # %entry
; MIPS64ELR6-NEXT: and $1, $2, $8
; MIPS64ELR6-NEXT: srlv $1, $1, $10
-; MIPS64ELR6-NEXT: seb $1, $1
+; MIPS64ELR6-NEXT: seh $1, $1
; MIPS64ELR6-NEXT: # %bb.3: # %entry
; MIPS64ELR6-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64ELR6-NEXT: # %bb.4: # %entry
; MIPS-NEXT: # %bb.2: # %entry
; MIPS-NEXT: and $1, $2, $8
; MIPS-NEXT: srlv $1, $1, $10
-; MIPS-NEXT: seb $1, $1
+; MIPS-NEXT: seh $1, $1
; MIPS-NEXT: # %bb.3: # %entry
; MIPS-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPS-NEXT: # %bb.4: # %entry
; MIPSR6-NEXT: # %bb.2: # %entry
; MIPSR6-NEXT: and $1, $2, $8
; MIPSR6-NEXT: srlv $1, $1, $10
-; MIPSR6-NEXT: seb $1, $1
+; MIPSR6-NEXT: seh $1, $1
; MIPSR6-NEXT: # %bb.3: # %entry
; MIPSR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSR6-NEXT: # %bb.4: # %entry
; MM-NEXT: # %bb.2: # %entry
; MM-NEXT: and $1, $2, $8
; MM-NEXT: srlv $1, $1, $10
-; MM-NEXT: seb $1, $1
+; MM-NEXT: seh $1, $1
; MM-NEXT: # %bb.3: # %entry
; MM-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MM-NEXT: # %bb.4: # %entry
; MMR6-NEXT: # %bb.2: # %entry
; MMR6-NEXT: and $1, $2, $8
; MMR6-NEXT: srlv $1, $1, $10
-; MMR6-NEXT: seb $1, $1
+; MMR6-NEXT: seh $1, $1
; MMR6-NEXT: # %bb.3: # %entry
; MMR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMR6-NEXT: # %bb.4: # %entry
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_min_8:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 255
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB9_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: srav $2, $2, $10
-; MIPS32-NEXT: srav $7, $7, $10
-; MIPS32-NEXT: sll $2, $2, 24
-; MIPS32-NEXT: sra $2, $2, 24
-; MIPS32-NEXT: sll $7, $7, 24
-; MIPS32-NEXT: sra $7, $7, 24
-; MIPS32-NEXT: slt $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movz $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB9_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 24
-; MIPS32-NEXT: sra $1, $1, 24
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_min_8:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MIPSEL-NEXT: $BB9_1: # %entry
; MIPSEL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSEL-NEXT: ll $2, 0($6)
-; MIPSEL-NEXT: srav $2, $2, $10
-; MIPSEL-NEXT: srav $7, $7, $10
-; MIPSEL-NEXT: seb $2, $2
-; MIPSEL-NEXT: seb $7, $7
+; MIPSEL-NEXT: and $2, $2, $8
+; MIPSEL-NEXT: and $7, $7, $8
; MIPSEL-NEXT: slt $5, $2, $7
; MIPSEL-NEXT: move $3, $2
; MIPSEL-NEXT: movz $3, $7, $5
; MIPSEL-NEXT: # %bb.2: # %entry
; MIPSEL-NEXT: and $1, $2, $8
; MIPSEL-NEXT: srlv $1, $1, $10
-; MIPSEL-NEXT: seb $1, $1
+; MIPSEL-NEXT: seh $1, $1
; MIPSEL-NEXT: # %bb.3: # %entry
; MIPSEL-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSEL-NEXT: # %bb.4: # %entry
; MIPSELR6-NEXT: $BB9_1: # %entry
; MIPSELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPSELR6-NEXT: ll $2, 0($6)
-; MIPSELR6-NEXT: srav $2, $2, $10
-; MIPSELR6-NEXT: srav $7, $7, $10
-; MIPSELR6-NEXT: seb $2, $2
-; MIPSELR6-NEXT: seb $7, $7
+; MIPSELR6-NEXT: and $2, $2, $8
+; MIPSELR6-NEXT: and $7, $7, $8
; MIPSELR6-NEXT: slt $5, $2, $7
; MIPSELR6-NEXT: selnez $3, $2, $5
; MIPSELR6-NEXT: seleqz $5, $7, $5
; MIPSELR6-NEXT: # %bb.2: # %entry
; MIPSELR6-NEXT: and $1, $2, $8
; MIPSELR6-NEXT: srlv $1, $1, $10
-; MIPSELR6-NEXT: seb $1, $1
+; MIPSELR6-NEXT: seh $1, $1
; MIPSELR6-NEXT: # %bb.3: # %entry
; MIPSELR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MIPSELR6-NEXT: # %bb.4: # %entry
; MMEL-NEXT: $BB9_1: # %entry
; MMEL-NEXT: # =>This Inner Loop Header: Depth=1
; MMEL-NEXT: ll $2, 0($6)
-; MMEL-NEXT: srav $2, $2, $10
-; MMEL-NEXT: srav $7, $7, $10
-; MMEL-NEXT: seb $2, $2
-; MMEL-NEXT: seb $7, $7
+; MMEL-NEXT: and $2, $2, $8
+; MMEL-NEXT: and $7, $7, $8
; MMEL-NEXT: slt $5, $2, $7
; MMEL-NEXT: or $3, $2, $zero
; MMEL-NEXT: movz $3, $7, $5
; MMEL-NEXT: # %bb.2: # %entry
; MMEL-NEXT: and $1, $2, $8
; MMEL-NEXT: srlv $1, $1, $10
-; MMEL-NEXT: seb $1, $1
+; MMEL-NEXT: seh $1, $1
; MMEL-NEXT: # %bb.3: # %entry
; MMEL-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMEL-NEXT: # %bb.4: # %entry
; MMELR6-NEXT: $BB9_1: # %entry
; MMELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MMELR6-NEXT: ll $2, 0($6)
-; MMELR6-NEXT: srav $2, $2, $10
-; MMELR6-NEXT: srav $7, $7, $10
-; MMELR6-NEXT: seb $2, $2
-; MMELR6-NEXT: seb $7, $7
+; MMELR6-NEXT: and $2, $2, $8
+; MMELR6-NEXT: and $7, $7, $8
; MMELR6-NEXT: slt $5, $2, $7
; MMELR6-NEXT: selnez $3, $2, $5
; MMELR6-NEXT: seleqz $5, $7, $5
; MMELR6-NEXT: # %bb.2: # %entry
; MMELR6-NEXT: and $1, $2, $8
; MMELR6-NEXT: srlv $1, $1, $10
-; MMELR6-NEXT: seb $1, $1
+; MMELR6-NEXT: seh $1, $1
; MMELR6-NEXT: # %bb.3: # %entry
; MMELR6-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
; MMELR6-NEXT: # %bb.4: # %entry
; MIPS64-NEXT: # %bb.2: # %entry
; MIPS64-NEXT: and $1, $2, $8
; MIPS64-NEXT: srlv $1, $1, $10
-; MIPS64-NEXT: seb $1, $1
+; MIPS64-NEXT: seh $1, $1
; MIPS64-NEXT: # %bb.3: # %entry
; MIPS64-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64-NEXT: # %bb.4: # %entry
; MIPS64R6-NEXT: # %bb.2: # %entry
; MIPS64R6-NEXT: and $1, $2, $8
; MIPS64R6-NEXT: srlv $1, $1, $10
-; MIPS64R6-NEXT: seb $1, $1
+; MIPS64R6-NEXT: seh $1, $1
; MIPS64R6-NEXT: # %bb.3: # %entry
; MIPS64R6-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64R6-NEXT: # %bb.4: # %entry
; MIPS64EL-NEXT: .LBB9_1: # %entry
; MIPS64EL-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64EL-NEXT: ll $2, 0($6)
-; MIPS64EL-NEXT: srav $2, $2, $10
-; MIPS64EL-NEXT: srav $7, $7, $10
-; MIPS64EL-NEXT: seb $2, $2
-; MIPS64EL-NEXT: seb $7, $7
+; MIPS64EL-NEXT: and $2, $2, $8
+; MIPS64EL-NEXT: and $7, $7, $8
; MIPS64EL-NEXT: slt $5, $2, $7
; MIPS64EL-NEXT: move $3, $2
; MIPS64EL-NEXT: movz $3, $7, $5
; MIPS64EL-NEXT: # %bb.2: # %entry
; MIPS64EL-NEXT: and $1, $2, $8
; MIPS64EL-NEXT: srlv $1, $1, $10
-; MIPS64EL-NEXT: seb $1, $1
+; MIPS64EL-NEXT: seh $1, $1
; MIPS64EL-NEXT: # %bb.3: # %entry
; MIPS64EL-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64EL-NEXT: # %bb.4: # %entry
; MIPS64ELR6-NEXT: .LBB9_1: # %entry
; MIPS64ELR6-NEXT: # =>This Inner Loop Header: Depth=1
; MIPS64ELR6-NEXT: ll $2, 0($6)
-; MIPS64ELR6-NEXT: srav $2, $2, $10
-; MIPS64ELR6-NEXT: srav $7, $7, $10
-; MIPS64ELR6-NEXT: seb $2, $2
-; MIPS64ELR6-NEXT: seb $7, $7
+; MIPS64ELR6-NEXT: and $2, $2, $8
+; MIPS64ELR6-NEXT: and $7, $7, $8
; MIPS64ELR6-NEXT: slt $5, $2, $7
; MIPS64ELR6-NEXT: selnez $3, $2, $5
; MIPS64ELR6-NEXT: seleqz $5, $7, $5
; MIPS64ELR6-NEXT: # %bb.2: # %entry
; MIPS64ELR6-NEXT: and $1, $2, $8
; MIPS64ELR6-NEXT: srlv $1, $1, $10
-; MIPS64ELR6-NEXT: seb $1, $1
+; MIPS64ELR6-NEXT: seh $1, $1
; MIPS64ELR6-NEXT: # %bb.3: # %entry
; MIPS64ELR6-NEXT: sw $1, 12($sp) # 4-byte Folded Spill
; MIPS64ELR6-NEXT: # %bb.4: # %entry
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umax_8:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 255
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB10_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: and $2, $2, $8
-; MIPS32-NEXT: and $7, $7, $8
-; MIPS32-NEXT: sltu $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movn $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB10_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_umax_8:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8
; MMR6-NEXT: addiu $sp, $sp, 8
; MMR6-NEXT: jrc $ra
;
-; MIPS32-LABEL: test_umin_8:
-; MIPS32: # %bb.0: # %entry
-; MIPS32-NEXT: addiu $sp, $sp, -8
-; MIPS32-NEXT: .cfi_def_cfa_offset 8
-; MIPS32-NEXT: # kill: def $at killed $a1
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $1, $zero, -4
-; MIPS32-NEXT: and $6, $4, $1
-; MIPS32-NEXT: andi $1, $4, 3
-; MIPS32-NEXT: sll $10, $1, 3
-; MIPS32-NEXT: ori $1, $zero, 255
-; MIPS32-NEXT: sllv $8, $1, $10
-; MIPS32-NEXT: nor $9, $zero, $8
-; MIPS32-NEXT: sllv $7, $5, $10
-; MIPS32-NEXT: $BB11_1: # %entry
-; MIPS32-NEXT: # =>This Inner Loop Header: Depth=1
-; MIPS32-NEXT: ll $2, 0($6)
-; MIPS32-NEXT: and $2, $2, $8
-; MIPS32-NEXT: and $7, $7, $8
-; MIPS32-NEXT: sltu $5, $2, $7
-; MIPS32-NEXT: move $3, $2
-; MIPS32-NEXT: movz $3, $7, $5
-; MIPS32-NEXT: and $3, $3, $8
-; MIPS32-NEXT: and $4, $2, $9
-; MIPS32-NEXT: or $4, $4, $3
-; MIPS32-NEXT: sc $4, 0($6)
-; MIPS32-NEXT: beqz $4, $BB11_1
-; MIPS32-NEXT: nop
-; MIPS32-NEXT: # %bb.2: # %entry
-; MIPS32-NEXT: and $1, $2, $8
-; MIPS32-NEXT: srlv $1, $1, $10
-; MIPS32-NEXT: sll $1, $1, 16
-; MIPS32-NEXT: sra $1, $1, 16
-; MIPS32-NEXT: # %bb.3: # %entry
-; MIPS32-NEXT: sw $1, 4($sp) # 4-byte Folded Spill
-; MIPS32-NEXT: # %bb.4: # %entry
-; MIPS32-NEXT: lw $2, 4($sp) # 4-byte Folded Reload
-; MIPS32-NEXT: sync
-; MIPS32-NEXT: addiu $sp, $sp, 8
-; MIPS32-NEXT: jr $ra
-; MIPS32-NEXT: nop
-;
; MIPSEL-LABEL: test_umin_8:
; MIPSEL: # %bb.0: # %entry
; MIPSEL-NEXT: addiu $sp, $sp, -8