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