diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-20 21:20:51 +0000 |
commit | 583e75cce441388bc562fa225d23499261a0091e (patch) | |
tree | 5944a7c248d4a8c858db45abc3444eb69270a3c8 /test/CodeGen | |
parent | 7442d6faa2719e4e7d33a7021c406c5a4facd74d (diff) |
Notes
Diffstat (limited to 'test/CodeGen')
-rw-r--r-- | test/CodeGen/debug-info-vla.c | 4 | ||||
-rw-r--r-- | test/CodeGen/fp-contract-on-asm.c | 18 | ||||
-rw-r--r-- | test/CodeGen/thinlto-backend-option.ll | 13 |
3 files changed, 33 insertions, 2 deletions
diff --git a/test/CodeGen/debug-info-vla.c b/test/CodeGen/debug-info-vla.c index 371d1060228e4..3b69773207b28 100644 --- a/test/CodeGen/debug-info-vla.c +++ b/test/CodeGen/debug-info-vla.c @@ -4,8 +4,8 @@ void testVLAwithSize(int s) { // CHECK: dbg.declare // CHECK: dbg.declare({{.*}}, metadata ![[VAR:.*]], metadata ![[EXPR:.*]]) -// CHECK: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+2]] -// CHECK: ![[EXPR]] = !DIExpression(DW_OP_deref) +// CHECK: ![[EXPR]] = !DIExpression() +// CHECK: ![[VAR]] = !DILocalVariable(name: "vla",{{.*}} line: [[@LINE+1]] int vla[s]; int i; for (i = 0; i < s; i++) { diff --git a/test/CodeGen/fp-contract-on-asm.c b/test/CodeGen/fp-contract-on-asm.c new file mode 100644 index 0000000000000..01a1bd14a0621 --- /dev/null +++ b/test/CodeGen/fp-contract-on-asm.c @@ -0,0 +1,18 @@ +// RUN: %clang_cc1 -O3 -triple=aarch64-apple-ios -S -o - %s | FileCheck %s +// REQUIRES: aarch64-registered-target + +float fma_test1(float a, float b, float c) { +#pragma STDC FP_CONTRACT ON +// CHECK-LABEL: fma_test1: +// CHECK: fmadd + float x = a * b + c; + return x; +} + +float fma_test2(float a, float b, float c) { +// CHECK-LABEL: fma_test2: +// CHECK: fmul +// CHECK: fadd + float x = a * b + c; + return x; +} diff --git a/test/CodeGen/thinlto-backend-option.ll b/test/CodeGen/thinlto-backend-option.ll new file mode 100644 index 0000000000000..4c7c0ea3efcda --- /dev/null +++ b/test/CodeGen/thinlto-backend-option.ll @@ -0,0 +1,13 @@ +; Test to ensure -backend-options work when invoking the ThinLTO backend path. + +; This test uses a non-existent backend option to test that backend options are +; being parsed. While it's more important that the existing options are parsed +; than that this error is produced, this provides a reliable way to test this +; scenario independent of any particular backend options that may exist now or +; in the future. + +; RUN: %clang -flto=thin -c -o %t.o %s +; RUN: llvm-lto -thinlto -o %t %t.o +; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -backend-option -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s + +; CHECK: clang: Unknown command line argument '-nonexistent' |