mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-25 18:16:04 +00:00

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.
10 lines
441 B
TableGen
10 lines
441 B
TableGen
// 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<[],[]>;
|
|
|