2021-12-24 02:02:24 +08:00
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
// Tests for the hvx qfloat feature and errors.
|
|
|
|
// -----------------------------------------------------------------------------
|
|
|
|
|
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv68 -mhvx -mhvx-qfloat \
|
|
|
|
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-QFLOAT %s
|
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv66 -mhvx=v68 -mhvx-qfloat \
|
|
|
|
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-QFLOAT %s
|
|
|
|
// CHECK-QFLOAT: "-target-feature" "+hvx-qfloat"
|
|
|
|
|
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv68 -mhvx -mhvx-qfloat \
|
|
|
|
// RUN: -mno-hvx-qfloat 2>&1 | FileCheck -check-prefix=CHECK-NO-QFLOAT %s
|
|
|
|
// CHECK-NO-QFLOAT: "-target-feature" "-hvx-qfloat"
|
|
|
|
|
2021-12-24 07:03:55 +08:00
|
|
|
// QFloat is valid only on hvxv68+.
|
2021-12-24 02:02:24 +08:00
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv68 -mhvx=v66 \
|
|
|
|
// RUN: -mhvx-qfloat 2>&1 | FileCheck -check-prefix=CHECK-ERROR1 %s
|
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv66 -mhvx -mhvx-qfloat \
|
|
|
|
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-ERROR1 %s
|
2021-12-24 07:03:55 +08:00
|
|
|
// CHECK-ERROR1: error: -mhvx-qfloat is not supported on HVX v66
|
2021-12-24 02:02:24 +08:00
|
|
|
|
|
|
|
// QFloat is valid only if HVX is enabled.
|
|
|
|
// RUN: %clang -c %s -### -target hexagon-unknown-elf -mv68 -mhvx-qfloat \
|
|
|
|
// RUN: 2>&1 | FileCheck -check-prefix=CHECK-ERROR2 %s
|
2021-12-24 07:03:55 +08:00
|
|
|
// CHECK-ERROR2: error: -mhvx-qfloat requires HVX, use -mhvx/-mhvx= to enable it
|