1 // RUN: llvm-tblgen -I %p/../../../../include -gen-global-isel-combiner \
2 // RUN: -combiners=Combiner %s 2>&1 | FileCheck %s
4 include "llvm/Target/Target.td"
5 include "llvm/Target/GlobalISel/Combine.td"
7 // Check we don't crash if a combine is present twice in the list.
9 def MyTargetISA : InstrInfo;
10 def MyTarget : Target { let InstructionSet = MyTargetISA; }
14 // CHECK: :[[@LINE+1]]:{{[0-9]+}}: warning: skipping rule 'Foo' because it has already been processed
15 def Foo : GICombineRule<
17 (match (G_ZEXT $root, $x)),
18 (apply (G_TRUNC $root, $x))>;
20 def Bar : GICombineRule<
22 (match (G_TRUNC $root, $x)),
23 (apply (G_ZEXT $root, $x))>;
25 def FooBar : GICombineGroup<[ Foo, Bar ]>;
27 def Combiner: GICombiner<"GenMyCombiner", [