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

Sanjay Patel via llvm-commits llvm-commits at lists.llvm.org
Wed Oct 5 14:43:51 PDT 2016


Author: spatel
Date: Wed Oct  5 16:43:50 2016
New Revision: 283393

URL: http://llvm.org/viewvc/llvm-project?rev=283393&view=rev
Log:
[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.

Modified:
    llvm/trunk/test/CodeGen/X86/negative-sin.ll

Modified: llvm/trunk/test/CodeGen/X86/negative-sin.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/negative-sin.ll?rev=283393&r1=283392&r2=283393&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/negative-sin.ll (original)
+++ llvm/trunk/test/CodeGen/X86/negative-sin.ll Wed Oct  5 16:43:50 2016
@@ -1,12 +1,19 @@
-; RUN: llc < %s -enable-unsafe-fp-math -march=x86-64 | FileCheck %s
-; CHECK-NOT:     {{addsd|subsd|xor}}
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: llc < %s -mtriple=x86_64-unknown-unknown | FileCheck %s
 
 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
   %g = call double @sin(double %f) readonly
   %h = fsub double 0.0, %g
   ret double %h
 }
+
+; FIXME: Check the instruction/node-level FMF instead of a function-level attribute.
+attributes #0 = { "unsafe-fp-math"="true" }
+




More information about the llvm-commits mailing list