diff options
Diffstat (limited to 'llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll')
-rw-r--r-- | llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll | 30 |
1 files changed, 10 insertions, 20 deletions
diff --git a/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll index e7b25219cdb..c127d120891 100644 --- a/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll +++ b/llvm/test/CodeGen/Mips/GlobalISel/llvm-ir/select.ll @@ -4,8 +4,7 @@ define i8 @select_i8(i1 %test, i8 %a, i8 %b) { ; MIPS32-LABEL: select_i8: ; MIPS32: # %bb.0: # %entry -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn $6, $5, $1 ; MIPS32-NEXT: move $2, $6 ; MIPS32-NEXT: jr $ra @@ -18,8 +17,7 @@ entry: define i16 @select_i16(i1 %test, i16 %a, i16 %b) { ; MIPS32-LABEL: select_i16: ; MIPS32: # %bb.0: # %entry -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn $6, $5, $1 ; MIPS32-NEXT: move $2, $6 ; MIPS32-NEXT: jr $ra @@ -32,8 +30,7 @@ entry: define i32 @select_i32(i1 %test, i32 %a, i32 %b) { ; MIPS32-LABEL: select_i32: ; MIPS32: # %bb.0: # %entry -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn $6, $5, $1 ; MIPS32-NEXT: move $2, $6 ; MIPS32-NEXT: jr $ra @@ -46,8 +43,7 @@ entry: define i32* @select_ptr(i1 %test, i32* %a, i32* %b) { ; MIPS32-LABEL: select_ptr: ; MIPS32: # %bb.0: # %entry -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn $6, $5, $1 ; MIPS32-NEXT: move $2, $6 ; MIPS32-NEXT: jr $ra @@ -62,8 +58,7 @@ define i32 @select_with_negation(i32 %a, i32 %b, i32 %x, i32 %y) { ; MIPS32: # %bb.0: # %entry ; MIPS32-NEXT: slt $1, $4, $5 ; MIPS32-NEXT: not $1, $1 -; MIPS32-NEXT: ori $2, $zero, 1 -; MIPS32-NEXT: and $1, $1, $2 +; MIPS32-NEXT: andi $1, $1, 1 ; MIPS32-NEXT: movn $7, $6, $1 ; MIPS32-NEXT: move $2, $7 ; MIPS32-NEXT: jr $ra @@ -84,8 +79,7 @@ define i64 @select_i64(i1 %test, i64 %a, i64 %b) { ; MIPS32-NEXT: lw $1, 0($1) ; MIPS32-NEXT: addiu $2, $sp, 28 ; MIPS32-NEXT: lw $2, 0($2) -; MIPS32-NEXT: ori $3, $zero, 1 -; MIPS32-NEXT: and $3, $4, $3 +; MIPS32-NEXT: andi $3, $4, 1 ; MIPS32-NEXT: movn $1, $6, $3 ; MIPS32-NEXT: movn $2, $7, $3 ; MIPS32-NEXT: sw $2, 4($sp) # 4-byte Folded Spill @@ -104,8 +98,7 @@ define void @select_ambiguous_i64_in_fpr(i1 %test, i64* %i64_ptr_a, i64* %i64_pt ; MIPS32: # %bb.0: # %entry ; MIPS32-NEXT: ldc1 $f0, 0($5) ; MIPS32-NEXT: ldc1 $f2, 0($6) -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn.d $f2, $f0, $1 ; MIPS32-NEXT: sdc1 $f2, 0($7) ; MIPS32-NEXT: jr $ra @@ -123,8 +116,7 @@ define float @select_float(i1 %test, float %a, float %b) { ; MIPS32: # %bb.0: # %entry ; MIPS32-NEXT: mtc1 $5, $f0 ; MIPS32-NEXT: mtc1 $6, $f1 -; MIPS32-NEXT: ori $1, $zero, 1 -; MIPS32-NEXT: and $1, $4, $1 +; MIPS32-NEXT: andi $1, $4, 1 ; MIPS32-NEXT: movn.s $f1, $f0, $1 ; MIPS32-NEXT: mov.s $f0, $f1 ; MIPS32-NEXT: jr $ra @@ -139,8 +131,7 @@ define void @select_ambiguous_float_in_gpr(i1 %test, float* %f32_ptr_a, float* % ; MIPS32: # %bb.0: # %entry ; MIPS32-NEXT: lw $1, 0($5) ; MIPS32-NEXT: lw $2, 0($6) -; MIPS32-NEXT: ori $3, $zero, 1 -; MIPS32-NEXT: and $3, $4, $3 +; MIPS32-NEXT: andi $3, $4, 1 ; MIPS32-NEXT: movn $2, $1, $3 ; MIPS32-NEXT: sw $2, 0($7) ; MIPS32-NEXT: jr $ra @@ -158,8 +149,7 @@ define double @select_double(double %a, double %b, i1 %test) { ; MIPS32: # %bb.0: # %entry ; MIPS32-NEXT: addiu $1, $sp, 16 ; MIPS32-NEXT: lw $1, 0($1) -; MIPS32-NEXT: ori $2, $zero, 1 -; MIPS32-NEXT: and $1, $1, $2 +; MIPS32-NEXT: andi $1, $1, 1 ; MIPS32-NEXT: movn.d $f14, $f12, $1 ; MIPS32-NEXT: mov.d $f0, $f14 ; MIPS32-NEXT: jr $ra |