1; RUN: llc -mtriple=thumbv7m-arm-none-eabi -mattr=+execute-only,+fp-armv8 %s -o - | FileCheck --check-prefixes=CHECK,VMOVSR %s 2; RUN: llc -mtriple=thumbv7m-arm-none-eabi -mattr=+execute-only,+fp-armv8,+neon,+neonfp %s -o - | FileCheck --check-prefixes=CHECK,NEON %s 3 4define arm_aapcs_vfpcc float @foo0() local_unnamed_addr { 5 %1 = fcmp nsz olt float undef, 0.000000e+00 6 %2 = select i1 %1, float -5.000000e-01, float 5.000000e-01 7 ret float %2 8} 9; CHECK-LABEL: foo0 10; CHECK: vcmpe.f32 {{s[0-9]+}}, #0 11 12 13define arm_aapcs_vfpcc float @float1() local_unnamed_addr { 14 br i1 undef, label %.end, label %1 15 16 %2 = fcmp nsz olt float undef, 1.000000e+00 17 %3 = select i1 %2, float -5.000000e-01, float 5.000000e-01 18 br label %.end 19 20.end: 21 %4 = phi float [ undef, %0 ], [ %3, %1] 22 ret float %4 23} 24; CHECK-LABEL: float1 25; CHECK: vmov.f32 [[FPREG:s[0-9]+]], #1.000000e+00 26; CHECK: vcmpe.f32 [[FPREG]], {{s[0-9]+}} 27 28define arm_aapcs_vfpcc float @float128() local_unnamed_addr { 29 %1 = fcmp nsz olt float undef, 128.000000e+00 30 %2 = select i1 %1, float -5.000000e-01, float 5.000000e-01 31 ret float %2 32} 33; CHECK-LABEL: float128 34; CHECK: mov.w [[REG:r[0-9]+]], #1124073472 35; VMOVSR: vmov [[FPREG:s[0-9]+]], [[REG]] 36; VMOVSR: vcmpe.f32 [[FPREG]], {{s[0-9]+}} 37; NEON: vmov d2, [[REG]], [[REG]] 38; NEON: vcmpe.f32 s4, {{s[0-9]+}} 39 40 41define arm_aapcs_vfpcc double @double1() local_unnamed_addr { 42 %1 = fcmp nsz olt double undef, 1.000000e+00 43 %2 = select i1 %1, double -5.000000e-01, double 5.000000e-01 44 ret double %2 45} 46; CHECK-LABEL: double1 47; CHECK: vmov.f64 [[FPREG:d[0-9]+]], #1.000000e+00 48; CHECK: vcmpe.f64 [[FPREG]], {{d[0-9]+}} 49 50define arm_aapcs_vfpcc double @double128() local_unnamed_addr { 51 %1 = fcmp nsz olt double undef, 128.000000e+00 52 %2 = select i1 %1, double -5.000000e-01, double 5.000000e-01 53 ret double %2 54} 55; CHECK-LABEL: double128 56; CHECK: movs [[REGH:r[0-9]+]], #0 57; CHECK: movt [[REGH]], #16480 58; CHECK: movs [[REGL:r[0-9]+]], #0 59; CHECK: vmov [[FPREG:d[0-9]+]], [[REGL]], [[REGH]] 60; CHECK: vcmpe.f64 [[FPREG]], {{d[0-9]+}} 61 62