Page MenuHomePhabricator

D58812.diff
No OneTemporary

File Metadata

Created
Sun, Dec 8, 11:04 PM

D58812.diff

Index: llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
===================================================================
--- llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
+++ llvm/trunk/lib/Target/ARM/ARMISelLowering.cpp
@@ -4174,18 +4174,18 @@
// Start by selecting the GE condition code for opcodes that return true for
// 'equality'
if (CC == ISD::SETUGE || CC == ISD::SETOGE || CC == ISD::SETOLE ||
- CC == ISD::SETULE)
+ CC == ISD::SETULE || CC == ISD::SETGE || CC == ISD::SETLE)
CondCode = ARMCC::GE;
// and GT for opcodes that return false for 'equality'.
else if (CC == ISD::SETUGT || CC == ISD::SETOGT || CC == ISD::SETOLT ||
- CC == ISD::SETULT)
+ CC == ISD::SETULT || CC == ISD::SETGT || CC == ISD::SETLT)
CondCode = ARMCC::GT;
// Since we are constrained to GE/GT, if the opcode contains 'less', we need
// to swap the compare operands.
if (CC == ISD::SETOLE || CC == ISD::SETULE || CC == ISD::SETOLT ||
- CC == ISD::SETULT)
+ CC == ISD::SETULT || CC == ISD::SETLE || CC == ISD::SETLT)
swpCmpOps = true;
// Both GT and GE are ordered comparisons, and return false for 'unordered'.
@@ -4211,8 +4211,9 @@
}
// 'unordered or not equal' is 'anything but equal', so use the EQ condition
- // code and swap the VSEL operands.
- if (CC == ISD::SETUNE) {
+ // code and swap the VSEL operands. Also do this if we don't care about the
+ // unordered case.
+ if (CC == ISD::SETUNE || CC == ISD::SETNE) {
CondCode = ARMCC::EQ;
swpVselOps = true;
}
Index: llvm/trunk/test/CodeGen/ARM/vsel.ll
===================================================================
--- llvm/trunk/test/CodeGen/ARM/vsel.ll
+++ llvm/trunk/test/CodeGen/ARM/vsel.ll
@@ -2,7 +2,7 @@
@varfloat = global float 0.0
@vardouble = global double 0.0
define void @test_vsel32sgt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
-; CHECK: test_vsel32sgt
+; CHECK-LABEL: test_vsel32sgt
%tst1 = icmp sgt i32 %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -11,7 +11,7 @@
ret void
}
define void @test_vsel64sgt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
-; CHECK: test_vsel64sgt
+; CHECK-LABEL: test_vsel64sgt
%tst1 = icmp sgt i32 %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -20,7 +20,7 @@
ret void
}
define void @test_vsel32sge(i32 %lhs32, i32 %rhs32, float %a, float %b) {
-; CHECK: test_vsel32sge
+; CHECK-LABEL: test_vsel32sge
%tst1 = icmp sge i32 %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -29,7 +29,7 @@
ret void
}
define void @test_vsel64sge(i32 %lhs32, i32 %rhs32, double %a, double %b) {
-; CHECK: test_vsel64sge
+; CHECK-LABEL: test_vsel64sge
%tst1 = icmp sge i32 %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -38,7 +38,7 @@
ret void
}
define void @test_vsel32eq(i32 %lhs32, i32 %rhs32, float %a, float %b) {
-; CHECK: test_vsel32eq
+; CHECK-LABEL: test_vsel32eq
%tst1 = icmp eq i32 %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -47,7 +47,7 @@
ret void
}
define void @test_vsel64eq(i32 %lhs32, i32 %rhs32, double %a, double %b) {
-; CHECK: test_vsel64eq
+; CHECK-LABEL: test_vsel64eq
%tst1 = icmp eq i32 %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -56,7 +56,7 @@
ret void
}
define void @test_vsel32slt(i32 %lhs32, i32 %rhs32, float %a, float %b) {
-; CHECK: test_vsel32slt
+; CHECK-LABEL: test_vsel32slt
%tst1 = icmp slt i32 %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -65,7 +65,7 @@
ret void
}
define void @test_vsel64slt(i32 %lhs32, i32 %rhs32, double %a, double %b) {
-; CHECK: test_vsel64slt
+; CHECK-LABEL: test_vsel64slt
%tst1 = icmp slt i32 %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -74,7 +74,7 @@
ret void
}
define void @test_vsel32sle(i32 %lhs32, i32 %rhs32, float %a, float %b) {
-; CHECK: test_vsel32sle
+; CHECK-LABEL: test_vsel32sle
%tst1 = icmp sle i32 %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -83,7 +83,7 @@
ret void
}
define void @test_vsel64sle(i32 %lhs32, i32 %rhs32, double %a, double %b) {
-; CHECK: test_vsel64sle
+; CHECK-LABEL: test_vsel64sle
%tst1 = icmp sle i32 %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -92,7 +92,7 @@
ret void
}
define void @test_vsel32ogt(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ogt
+; CHECK-LABEL: test_vsel32ogt
%tst1 = fcmp ogt float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -101,7 +101,7 @@
ret void
}
define void @test_vsel64ogt(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ogt
+; CHECK-LABEL: test_vsel64ogt
%tst1 = fcmp ogt float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -110,7 +110,7 @@
ret void
}
define void @test_vsel32oge(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32oge
+; CHECK-LABEL: test_vsel32oge
%tst1 = fcmp oge float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -119,7 +119,7 @@
ret void
}
define void @test_vsel64oge(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64oge
+; CHECK-LABEL: test_vsel64oge
%tst1 = fcmp oge float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -128,7 +128,7 @@
ret void
}
define void @test_vsel32oeq(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32oeq
+; CHECK-LABEL: test_vsel32oeq
%tst1 = fcmp oeq float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -137,7 +137,7 @@
ret void
}
define void @test_vsel64oeq(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64oeq
+; CHECK-LABEL: test_vsel64oeq
%tst1 = fcmp oeq float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -146,7 +146,7 @@
ret void
}
define void @test_vsel32ugt(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ugt
+; CHECK-LABEL: test_vsel32ugt
%tst1 = fcmp ugt float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -155,7 +155,7 @@
ret void
}
define void @test_vsel64ugt(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ugt
+; CHECK-LABEL: test_vsel64ugt
%tst1 = fcmp ugt float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -164,7 +164,7 @@
ret void
}
define void @test_vsel32uge(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32uge
+; CHECK-LABEL: test_vsel32uge
%tst1 = fcmp uge float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -173,7 +173,7 @@
ret void
}
define void @test_vsel64uge(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64uge
+; CHECK-LABEL: test_vsel64uge
%tst1 = fcmp uge float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -182,7 +182,7 @@
ret void
}
define void @test_vsel32olt(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32olt
+; CHECK-LABEL: test_vsel32olt
%tst1 = fcmp olt float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -191,7 +191,7 @@
ret void
}
define void @test_vsel64olt(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64olt
+; CHECK-LABEL: test_vsel64olt
%tst1 = fcmp olt float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -200,7 +200,7 @@
ret void
}
define void @test_vsel32ult(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ult
+; CHECK-LABEL: test_vsel32ult
%tst1 = fcmp ult float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -209,7 +209,7 @@
ret void
}
define void @test_vsel64ult(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ult
+; CHECK-LABEL: test_vsel64ult
%tst1 = fcmp ult float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -218,7 +218,7 @@
ret void
}
define void @test_vsel32ole(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ole
+; CHECK-LABEL: test_vsel32ole
%tst1 = fcmp ole float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -227,7 +227,7 @@
ret void
}
define void @test_vsel64ole(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ole
+; CHECK-LABEL: test_vsel64ole
%tst1 = fcmp ole float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -236,7 +236,7 @@
ret void
}
define void @test_vsel32ule(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ule
+; CHECK-LABEL: test_vsel32ule
%tst1 = fcmp ule float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -245,7 +245,7 @@
ret void
}
define void @test_vsel64ule(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ule
+; CHECK-LABEL: test_vsel64ule
%tst1 = fcmp ule float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -254,7 +254,7 @@
ret void
}
define void @test_vsel32ord(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32ord
+; CHECK-LABEL: test_vsel32ord
%tst1 = fcmp ord float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -263,7 +263,7 @@
ret void
}
define void @test_vsel64ord(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64ord
+; CHECK-LABEL: test_vsel64ord
%tst1 = fcmp ord float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -272,7 +272,7 @@
ret void
}
define void @test_vsel32une(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32une
+; CHECK-LABEL: test_vsel32une
%tst1 = fcmp une float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -281,7 +281,7 @@
ret void
}
define void @test_vsel64une(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64une
+; CHECK-LABEL: test_vsel64une
%tst1 = fcmp une float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -290,7 +290,7 @@
ret void
}
define void @test_vsel32uno(float %lhs32, float %rhs32, float %a, float %b) {
-; CHECK: test_vsel32uno
+; CHECK-LABEL: test_vsel32uno
%tst1 = fcmp uno float %lhs32, %rhs32
%val1 = select i1 %tst1, float %a, float %b
store float %val1, float* @varfloat
@@ -299,7 +299,7 @@
ret void
}
define void @test_vsel64uno(float %lhs32, float %rhs32, double %a, double %b) {
-; CHECK: test_vsel64uno
+; CHECK-LABEL: test_vsel64uno
%tst1 = fcmp uno float %lhs32, %rhs32
%val1 = select i1 %tst1, double %a, double %b
store double %val1, double* @vardouble
@@ -307,3 +307,220 @@
; CHECK: vselvs.f64 d16, d1, d2
ret void
}
+
+define void @test_vsel32ogt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ogt_nnan
+ %tst1 = fcmp nnan ogt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselgt.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64ogt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ogt_nnan
+ %tst1 = fcmp nnan ogt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselgt.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32oge_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32oge_nnan
+ %tst1 = fcmp nnan oge float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselge.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64oge_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64oge_nnan
+ %tst1 = fcmp nnan oge float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselge.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32oeq_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32oeq_nnan
+ %tst1 = fcmp nnan oeq float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmp.f32 s0, s1
+; CHECK: vseleq.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64oeq_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64oeq_nnan
+ %tst1 = fcmp nnan oeq float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmp.f32 s0, s1
+; CHECK: vseleq.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32ugt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ugt_nnan
+ %tst1 = fcmp nnan ugt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselgt.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64ugt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ugt_nnan
+ %tst1 = fcmp nnan ugt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselgt.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32uge_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32uge_nnan
+ %tst1 = fcmp nnan uge float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselge.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64uge_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64uge_nnan
+ %tst1 = fcmp nnan uge float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselge.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32olt_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32olt_nnan
+ %tst1 = fcmp nnan olt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselgt.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64olt_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64olt_nnan
+ %tst1 = fcmp nnan olt float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselgt.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32ult_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ult_nnan
+ %tst1 = fcmp nnan ult float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselgt.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64ult_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ult_nnan
+ %tst1 = fcmp nnan ult float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselgt.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32ole_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ole_nnan
+ %tst1 = fcmp nnan ole float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselge.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64ole_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ole_nnan
+ %tst1 = fcmp nnan ole float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselge.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32ule_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ule_nnan
+ %tst1 = fcmp nnan ule float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselge.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64ule_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ule_nnan
+ %tst1 = fcmp nnan ule float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s1, s0
+; CHECK: vselge.f64 d16, d1, d2
+ ret void
+}
+define void @test_vsel32ord_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32ord_nnan
+ %tst1 = fcmp nnan ord float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselvs.f32 s0, s3, s2
+ ret void
+}
+define void @test_vsel64ord_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64ord_nnan
+ %tst1 = fcmp nnan ord float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselvs.f64 d16, d2, d1
+ ret void
+}
+define void @test_vsel32une_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32une_nnan
+ %tst1 = fcmp nnan une float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmp.f32 s0, s1
+; CHECK: vseleq.f32 s0, s3, s2
+ ret void
+}
+define void @test_vsel64une_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64une_nnan
+ %tst1 = fcmp nnan une float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmp.f32 s0, s1
+; CHECK: vseleq.f64 d16, d2, d1
+ ret void
+}
+define void @test_vsel32uno_nnan(float %lhs32, float %rhs32, float %a, float %b) {
+; CHECK-LABEL: test_vsel32uno_nnan
+ %tst1 = fcmp nnan uno float %lhs32, %rhs32
+ %val1 = select i1 %tst1, float %a, float %b
+ store float %val1, float* @varfloat
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselvs.f32 s0, s2, s3
+ ret void
+}
+define void @test_vsel64uno_nnan(float %lhs32, float %rhs32, double %a, double %b) {
+; CHECK-LABEL: test_vsel64uno_nnan
+ %tst1 = fcmp nnan uno float %lhs32, %rhs32
+ %val1 = select i1 %tst1, double %a, double %b
+ store double %val1, double* @vardouble
+; CHECK: vcmpe.f32 s0, s1
+; CHECK: vselvs.f64 d16, d1, d2
+ ret void
+}

Event Timeline