Add AArch64 as an experimental target.
[oota-llvm.git] / test / CodeGen / AArch64 / fp-cond-sel.ll
1 ; RUN: llc -verify-machineinstrs < %s -march=aarch64 | FileCheck %s
2
3 @varfloat = global float 0.0
4 @vardouble = global double 0.0
5
6 define void @test_csel(i32 %lhs32, i32 %rhs32, i64 %lhs64) {
7 ; CHECK: test_csel:
8
9   %tst1 = icmp ugt i32 %lhs32, %rhs32
10   %val1 = select i1 %tst1, float 0.0, float 1.0
11   store float %val1, float* @varfloat
12 ; CHECK: fmov [[FLT1:s[0-9]+]], #1.0
13 ; CHECK: ldr [[FLT0:s[0-9]+]], .LCPI
14 ; CHECK: fcsel {{s[0-9]+}}, [[FLT0]], [[FLT1]], hi
15
16   %rhs64 = sext i32 %rhs32 to i64
17   %tst2 = icmp sle i64 %lhs64, %rhs64
18   %val2 = select i1 %tst2, double 1.0, double 0.0
19   store double %val2, double* @vardouble
20 ; CHECK: ldr [[FLT0:d[0-9]+]], .LCPI
21 ; CHECK: fmov [[FLT1:d[0-9]+]], #1.0
22 ; CHECK: fcsel {{d[0-9]+}}, [[FLT1]], [[FLT0]], le
23
24   ret void
25 ; CHECK: ret
26 }