[DAG] change test to use 'unsafe' function attribute instead of global setting

But we have node-level FMF, so the next step is to fix this at the instruction/node-level.

llvm-svn: 283393
This commit is contained in:
Sanjay Patel 2016-10-05 21:43:50 +00:00
parent d381c9842b
commit 5839858584
1 changed files with 11 additions and 4 deletions

View File

@ -1,12 +1,19 @@
; RUN: llc < %s -enable-unsafe-fp-math -march=x86-64 | FileCheck %s ; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; CHECK-NOT: {{addsd|subsd|xor}} ; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
declare double @sin(double %f) declare double @sin(double %f)
define double @foo(double %e) define double @foo(double %e) nounwind #0 {
{ ; CHECK-LABEL: foo:
; CHECK: # BB#0:
; CHECK-NEXT: jmp sin
;
%f = fsub double 0.0, %e %f = fsub double 0.0, %e
%g = call double @sin(double %f) readonly %g = call double @sin(double %f) readonly
%h = fsub double 0.0, %g %h = fsub double 0.0, %g
ret double %h ret double %h
} }
; FIXME: Check the instruction/node-level FMF instead of a function-level attribute.
attributes #0 = { "unsafe-fp-math"="true" }