Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Clang][RISCV] Guard vector int64, float32, float64 with semantic ana…
…lysis Depends on D143657 Reviewed By: craig.topper Differential Revision: https://reviews.llvm.org/D143665
- Loading branch information
Showing
6 changed files
with
35 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ | ||
// RUN: -target-feature +zve32x -target-feature +zfh \ | ||
// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify | ||
// REQUIRES: riscv-registered-target | ||
#include <riscv_vector.h> | ||
|
||
vfloat32m1_t foo() { /* expected-error {{RISC-V type 'vfloat32m1_t' (aka '__rvv_float32m1_t') requires the 'zve32f' extension}} */ | ||
} /* expected-warning {{non-void function does not return a value}}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ | ||
// RUN: -target-feature +zve64f -target-feature +zfh \ | ||
// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify | ||
// REQUIRES: riscv-registered-target | ||
#include <riscv_vector.h> | ||
|
||
vfloat64m1_t foo() { /* expected-error {{RISC-V type 'vfloat64m1_t' (aka '__rvv_float64m1_t') requires the 'zve64d' extension}} */ | ||
} /* expected-warning {{non-void function does not return a value}}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
// RUN: %clang_cc1 -triple riscv64 -target-feature +f -target-feature +d \ | ||
// RUN: -target-feature +zve32x -target-feature +zfh \ | ||
// RUN: -disable-O0-optnone -o - -fsyntax-only %s -verify | ||
// REQUIRES: riscv-registered-target | ||
#include <riscv_vector.h> | ||
|
||
vint64m1_t foo() { /* expected-error {{RISC-V type 'vint64m1_t' (aka '__rvv_int64m1_t') requires the 'zve64x' extension}} */ | ||
} /* expected-warning {{non-void function does not return a value}}*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters