Skip to content

Commit 94efe98

Browse files
committed
Add lit test for implicit defs of physical registers
1 parent 8d66a39 commit 94efe98

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
// RUN: llvm-tblgen -gen-global-isel -warn-on-skipped-patterns -I %p/../../include -I %p/Common %s -o /dev/null 2>&1 < %s | FileCheck %s
2+
3+
include "llvm/Target/Target.td"
4+
include "GlobalISelEmitterCommon.td"
5+
6+
// CHECK-NOT: Skipped pattern: Src pattern result has 1 def(s) without the HasNoUse predicate set to true but Dst MI has no def
7+
// CHECK: Skipped pattern: Pattern defines a physical register
8+
let Uses = [B0], Defs = [B0] in
9+
def tst1 : I<(outs), (ins), [(set B0, (add B0, 1))]>;
10+
11+
// CHECK: Skipped pattern: Src pattern result has 1 def(s) without the HasNoUse predicate set to true but Dst MI has no def
12+
let Uses = [B0] in
13+
def tst2 : I<(outs), (ins), [(set B0, (add B0, 1))]>;

0 commit comments

Comments
 (0)