mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-04 09:00:33 +03:00
15 lines
357 B
D
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"
|