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

Currently operand constraint checks on "$dest = $src" are inadvertently accepting any token that contains "=". This has surprising results, e.g, "$dest != $src" is accepted as a constraint but then treated as "=". This patch ensures that only exactly the token "=" is accepted.
9 lines
356 B
TableGen
9 lines
356 B
TableGen
// RUN: not llvm-tblgen -gen-asm-writer -I %p -I %p/../../include %s 2>&1 | FileCheck %s -DFILE=%s
|
|
|
|
include "ConstraintChecking.inc"
|
|
|
|
// (This is illegal because the '=' has to be surrounded by whitespace)
|
|
|
|
// CHECK: [[FILE]]:[[@LINE+1]]:5: error: Unrecognized constraint '$dest1=$dest2' in 'Foo'
|
|
def Foo : TestInstructionWithConstraints<"$dest1=$dest2">;
|