1 # NOTE: Assertions have been autogenerated by utils/update_mir_test_checks.py
2 # RUN: llc -O0 -mtriple=aarch64 -run-pass=instruction-select -verify-machineinstrs %s -o - | FileCheck %s
3 # Verify that we get FCMPSri when we compare against 0.0 and that we get
12 tracksRegLiveness: true
17 ; CHECK-LABEL: name: zero
18 ; CHECK: liveins: $s0, $s1
19 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
20 ; CHECK: FCMPSri [[COPY]], implicit-def $nzcv
21 ; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
22 ; CHECK: $s0 = COPY [[CSINCWr]]
23 ; CHECK: RET_ReallyLR implicit $s0
24 %0:fpr(s32) = COPY $s0
25 %1:fpr(s32) = COPY $s1
26 %2:fpr(s32) = G_FCONSTANT float 0.000000e+00
27 %3:gpr(s32) = G_FCMP floatpred(oeq), %0(s32), %2
29 RET_ReallyLR implicit $s0
37 tracksRegLiveness: true
38 machineFunctionInfo: {}
43 ; CHECK-LABEL: name: notzero
44 ; CHECK: liveins: $s0, $s1
45 ; CHECK: [[COPY:%[0-9]+]]:fpr32 = COPY $s0
46 ; CHECK: [[FMOVSi:%[0-9]+]]:fpr32 = FMOVSi 112
47 ; CHECK: FCMPSrr [[COPY]], [[FMOVSi]], implicit-def $nzcv
48 ; CHECK: [[CSINCWr:%[0-9]+]]:gpr32 = CSINCWr $wzr, $wzr, 1, implicit $nzcv
49 ; CHECK: $s0 = COPY [[CSINCWr]]
50 ; CHECK: RET_ReallyLR implicit $s0
51 %0:fpr(s32) = COPY $s0
52 %1:fpr(s32) = COPY $s1
53 %2:fpr(s32) = G_FCONSTANT float 1.000000e+00
54 %3:gpr(s32) = G_FCMP floatpred(oeq), %0(s32), %2
56 RET_ReallyLR implicit $s0