ldc/tests/codegen/ffastmath.d
Johan Engelen cd3ae57d14 Implement -ffast-math.
Resolves #1874.
2016-12-14 12:27:45 +01:00

15 lines
357 B
D

// Test -ffast-math
// RUN: %ldc -ffast-math -O0 -release -c -output-ll -of=%t.ll %s && FileCheck %s < %t.ll
import ldc.attributes;
// CHECK-LABEL: define{{.*}} @foo
// CHECK-SAME: #[[ATTR:[0-9]+]]
extern (C) double foo(double a, double b)
{
// CHECK: fmul fast
return a * b;
}
// CHECK-DAG: attributes #[[ATTR]] ={{.*}} "unsafe-fp-math"="true"