1 ; RUN: llc -verify-machineinstrs -o - %s -mtriple=arm64-apple-ios7.0 -aarch64-enable-atomic-cfg-tidy=0 | FileCheck %s
2 ; RUN: llc -verify-machineinstrs < %s -mtriple=aarch64-none-linux-gnu -mattr=-fp-armv8 -aarch64-enable-atomic-cfg-tidy=0 | FileCheck --check-prefix=CHECK-NOFP %s
4 define i32 @test_select_i32(i1 %bit, i32 %a, i32 %b) {
5 ; CHECK-LABEL: test_select_i32:
6 %val = select i1 %bit, i32 %a, i32 %b
8 ; CHECK-NEXT: csel w0, w1, w2, ne
13 define i64 @test_select_i64(i1 %bit, i64 %a, i64 %b) {
14 ; CHECK-LABEL: test_select_i64:
15 %val = select i1 %bit, i64 %a, i64 %b
17 ; CHECK-NEXT: csel x0, x1, x2, ne
22 define float @test_select_float(i1 %bit, float %a, float %b) {
23 ; CHECK-LABEL: test_select_float:
24 %val = select i1 %bit, float %a, float %b
26 ; CHECK-NEXT: fcsel s0, s0, s1, ne
27 ; CHECK-NOFP-NOT: fcsel
31 define double @test_select_double(i1 %bit, double %a, double %b) {
32 ; CHECK-LABEL: test_select_double:
33 %val = select i1 %bit, double %a, double %b
35 ; CHECK-NEXT: fcsel d0, d0, d1, ne
36 ; CHECK-NOFP-NOT: fcsel
41 define i32 @test_brcond(i1 %bit) {
42 ; CHECK-LABEL: test_brcond:
43 br i1 %bit, label %true, label %false
44 ; CHECK: tbz {{w[0-9]+}}, #0, {{.?LBB}}
52 define i1 @test_setcc_float(float %lhs, float %rhs) {
53 ; CHECK: test_setcc_float
54 %val = fcmp oeq float %lhs, %rhs
57 ; CHECK-NOFP-NOT: fcmp
61 define i1 @test_setcc_double(double %lhs, double %rhs) {
62 ; CHECK: test_setcc_double
63 %val = fcmp oeq double %lhs, %rhs
66 ; CHECK-NOFP-NOT: fcmp
70 define i1 @test_setcc_i32(i32 %lhs, i32 %rhs) {
71 ; CHECK: test_setcc_i32
72 %val = icmp ugt i32 %lhs, %rhs
78 define i1 @test_setcc_i64(i64 %lhs, i64 %rhs) {
79 ; CHECK: test_setcc_i64
80 %val = icmp ne i64 %lhs, %rhs