brintos

brintos / llvm-project-archived public Read only

0
0
Text · 805 B · da38a22 Raw
31 lines · plain
1// RUN: llvm-tblgen -I %p/../../../../include -gen-global-isel-combiner \2// RUN:     -combiners=Combiner %s 2>&1 | FileCheck %s3 4include "llvm/Target/Target.td"5include "llvm/Target/GlobalISel/Combine.td"6 7// Check we don't crash if a combine is present twice in the list.8 9def MyTargetISA : InstrInfo;10def MyTarget : Target { let InstructionSet = MyTargetISA; }11 12def dummy;13 14// CHECK: :[[@LINE+1]]:{{[0-9]+}}: warning: skipping rule 'Foo' because it has already been processed15def Foo : GICombineRule<16  (defs root:$root),17  (match (G_ZEXT $root, $x)),18  (apply (G_TRUNC $root, $x))>;19 20def Bar : GICombineRule<21  (defs root:$root),22  (match (G_TRUNC $root, $x)),23  (apply (G_ZEXT $root, $x))>;24 25def FooBar : GICombineGroup<[ Foo, Bar ]>;26 27def Combiner: GICombiner<"GenMyCombiner", [28  FooBar,29  Foo30]>;31