| 1 |
// ----------------------------------------------------------------------------- |
| 2 |
// Tests for the hvx qfloat feature and errors. |
| 3 |
// ----------------------------------------------------------------------------- |
| 4 |
|
| 5 |
// RUN: %clang -c %s -### --target=hexagon-unknown-elf -mv68 -mhvx -mhvx-qfloat \ |
| 6 |
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-QFLOAT %s |
| 7 |
// RUN: %clang -c %s -### --target=hexagon-unknown-elf -mv66 -mhvx=v68 -mhvx-qfloat \ |
| 8 |
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-QFLOAT %s |
| 9 |
// CHECK-QFLOAT: "-target-feature" "+hvx-qfloat" |
| 10 |
|
| 11 |
// RUN: %clang -c %s -### --target=hexagon-unknown-elf -mv68 -mhvx -mhvx-qfloat \ |
| 12 |
// RUN: -mno-hvx-qfloat 2>&1 | FileCheck -check-prefix=CHECK-NO-QFLOAT %s |
| 13 |
// CHECK-NO-QFLOAT: "-target-feature" "-hvx-qfloat" |
| 14 |
|
| 15 |
// QFloat is valid only on hvxv68+. |
| 16 |
// RUN: not %clang -c %s -### --target=hexagon-unknown-elf -mv68 -mhvx=v66 \ |
| 17 |
// RUN: -mhvx-qfloat 2>&1 | FileCheck -check-prefix=CHECK-ERROR1 %s |
| 18 |
// RUN: not %clang -c %s -### --target=hexagon-unknown-elf -mv66 -mhvx -mhvx-qfloat \ |
| 19 |
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-ERROR1 %s |
| 20 |
// CHECK-ERROR1: error: -mhvx-qfloat is not supported on HVX v66 |
| 21 |
|
| 22 |
// QFloat is valid only if HVX is enabled. |
| 23 |
// RUN: not %clang -c %s -### --target=hexagon-unknown-elf -mv68 -mhvx-qfloat \ |
| 24 |
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-ERROR2 %s |
| 25 |
// CHECK-ERROR2: error: -mhvx-qfloat requires HVX, use -mhvx/-mhvx= to enable it |