1 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu | FileCheck %s
2 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-none-linux-gnu | FileCheck %s
6 define void @test_float(float %a, float %b) {
7 ; CHECK-LABEL: test_float:
9 %tst1 = fcmp oeq float %a, %b
10 br i1 %tst1, label %end, label %t2
11 ; CHECK: fcmp {{s[0-9]+}}, {{s[0-9]+}}
15 %tst2 = fcmp une float %b, 0.0
16 br i1 %tst2, label %t3, label %end
17 ; CHECK: fcmp {{s[0-9]+}}, #0.0
22 ; This test can't be implemented with just one A64 conditional
23 ; branch. LLVM converts "ordered and not equal" to "unordered or
24 ; equal" before instruction selection, which is what we currently
25 ; test. Obviously, other sequences are valid.
26 %tst3 = fcmp one float %a, %b
27 br i1 %tst3, label %t4, label %end
28 ; CHECK: fcmp {{s[0-9]+}}, {{s[0-9]+}}
29 ; CHECK-NEXT: b.eq .[[T4:LBB[0-9]+_[0-9]+]]
30 ; CHECK-NEXT: b.vs .[[T4]]
32 %tst4 = fcmp uge float %a, -0.0
33 br i1 %tst4, label %t5, label %end
34 ; CHECK-NOT: fcmp {{s[0-9]+}}, #0.0
45 define void @test_double(double %a, double %b) {
46 ; CHECK-LABEL: test_double:
48 %tst1 = fcmp oeq double %a, %b
49 br i1 %tst1, label %end, label %t2
50 ; CHECK: fcmp {{d[0-9]+}}, {{d[0-9]+}}
54 %tst2 = fcmp une double %b, 0.0
55 br i1 %tst2, label %t3, label %end
56 ; CHECK: fcmp {{d[0-9]+}}, #0.0
61 ; This test can't be implemented with just one A64 conditional
62 ; branch. LLVM converts "ordered and not equal" to "unordered or
63 ; equal" before instruction selection, which is what we currently
64 ; test. Obviously, other sequences are valid.
65 %tst3 = fcmp one double %a, %b
66 br i1 %tst3, label %t4, label %end
67 ; CHECK: fcmp {{d[0-9]+}}, {{d[0-9]+}}
68 ; CHECK-NEXT: b.eq .[[T4:LBB[0-9]+_[0-9]+]]
69 ; CHECK-NEXT: b.vs .[[T4]]
71 %tst4 = fcmp uge double %a, -0.0
72 br i1 %tst4, label %t5, label %end
73 ; CHECK-NOT: fcmp {{d[0-9]+}}, #0.0