blob: 21cc683f734fbb887d364e44f33e9dff3f520c60 [file] [log] [blame]
Pete Cooper46361a12015-04-29 23:51:33 +00001; RUN: llc %s -o - -verify-machineinstrs | FileCheck %s
2
3target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
4target triple = "x86_64-unknown-unknown"
5
6; Test that we can generate an fcmove, and also that it passes verification.
7
8; CHECK-LABEL: cmove_f
9; CHECK: fcmove %st({{[0-7]}}), %st(0)
10define x86_fp80 @cmove_f(x86_fp80 %a, x86_fp80 %b, i32 %c) {
11 %test = icmp eq i32 %c, 0
12 %add = fadd x86_fp80 %a, %b
13 %ret = select i1 %test, x86_fp80 %add, x86_fp80 %b
14 ret x86_fp80 %ret
15}