forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[LLVM][TableGen] Check name conflicts between target dep and independ…
…ent intrinsics (llvm#109826) Validate that for target independent intrinsics the second dotted component of their name (after the `llvm.`) does not match any existing target names (for which atleast one intrinsic has been defined). Doing so is invalid as LLVM will search for that intrinsic in that target's intrinsic table and not find it, and conclude that its an unknown intrinsic.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
9 changes: 9 additions & 0 deletions
9
llvm/test/TableGen/intrinsic-target-prefix-for-target-independent.td
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,9 @@ | ||
// RUN: not llvm-tblgen -gen-intrinsic-enums -I %p/../../include %s 2>&1 | FileCheck %s -DFILE=%s | ||
|
||
include "llvm/IR/Intrinsics.td" | ||
|
||
// Check that target independent intrinsics with a prefix that matches a target | ||
// name are flagged. | ||
// CHECK: [[FILE]]:[[@LINE+1]]:5: error: target independent intrinsic `llvm.aarch64.foo' has prefix `llvm.aarch64` that conflicts with intrinsics for target `aarch64` | ||
def int_aarch64_foo : Intrinsic<[],[]>; | ||
|
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