mirror of
https://github.com/RPCS3/llvm.git
synced 2024-12-14 07:31:53 +00:00
224f06e5dd
This was breaking sqlite with the machine verifier because operand 0 was a def according to tablegen, but didn't have the 'isDef' flag set. Looking at the ISA, its clear that this operand is a source as writing to st(0) is implicit. So move the operand to the correct place in the td file. rdar://problem/20751584 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@236183 91177308-0d34-0410-b5e6-96231b3b80d8
15 lines
492 B
LLVM
15 lines
492 B
LLVM
; RUN: llc %s -o - -verify-machineinstrs | FileCheck %s
|
|
|
|
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
|
|
target triple = "x86_64-unknown-unknown"
|
|
|
|
; Test that we can generate an fcmove, and also that it passes verification.
|
|
|
|
; CHECK-LABEL: cmove_f
|
|
; CHECK: fcmove %st({{[0-7]}}), %st(0)
|
|
define x86_fp80 @cmove_f(x86_fp80 %a, x86_fp80 %b, i32 %c) {
|
|
%test = icmp eq i32 %c, 0
|
|
%add = fadd x86_fp80 %a, %b
|
|
%ret = select i1 %test, x86_fp80 %add, x86_fp80 %b
|
|
ret x86_fp80 %ret
|
|
} |