mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-05 01:20:51 +03:00

* LLVM 9: fix sanitizer pass renaming * Add LLVM 9 to intrinsics in druntime * LLVM 9: fix commandline option change from `-disable-fp-elim` to -frame-pointer=` Resolves issue 2980
27 lines
1 KiB
D
27 lines
1 KiB
D
// Tests that our TargetMachine options are added as function attributes
|
|
|
|
// RUN: %ldc -c -output-ll -of=%t.ll %s
|
|
// RUN: FileCheck %s --check-prefix=COMMON --check-prefix=WITH_FP < %t.ll
|
|
// RUN: %ldc -c -output-ll -of=%t.ll %s -O2
|
|
// RUN: FileCheck %s --check-prefix=COMMON --check-prefix=NO_FP < %t.ll
|
|
// RUN: %ldc -c -output-ll -of=%t.ll %s -O2 %disable_fp_elim
|
|
// RUN: FileCheck %s --check-prefix=COMMON --check-prefix=WITH_FP < %t.ll
|
|
// RUN: %ldc -c -output-ll -of=%t.ll %s %enable_fp_elim -mattr=test
|
|
// RUN: FileCheck %s --check-prefix=COMMON --check-prefix=NO_FP --check-prefix=ATTR < %t.ll
|
|
|
|
// COMMON: define{{.*}} @{{.*}}3fooFZv{{.*}} #[[KEYVALUE:[0-9]+]]
|
|
void foo()
|
|
{
|
|
}
|
|
|
|
// COMMON: attributes #[[KEYVALUE]]
|
|
// COMMON-DAG: "target-cpu"=
|
|
// COMMON-DAG: "unsafe-fp-math"="false"
|
|
// COMMON-DAG: "less-precise-fpmad"="false"
|
|
// COMMON-DAG: "no-infs-fp-math"="false"
|
|
// COMMON-DAG: "no-nans-fp-math"="false"
|
|
|
|
// WITH_FP-DAG: "no-frame-pointer-elim"="true"
|
|
// NO_FP-DAG: "no-frame-pointer-elim"="false"
|
|
|
|
// ATTR-DAG: "target-features"="{{[^"]*}}+test
|