| Pete Cooper | 46361a1 | 2015-04-29 23:51:33 +0000 | [diff] [blame^] | 1 | ; RUN: llc %s -o - -verify-machineinstrs | FileCheck %s | 
|  | 2 |  | 
|  | 3 | target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" | 
|  | 4 | target 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) | 
|  | 10 | define 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 | } |