brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.3 KiB · c6ca9b7 Raw
27 lines · plain
1// RUN: llvm-tblgen %s -gen-global-isel -optimize-match-table=true -I %p/../../../include -I %p/../Common | FileCheck %s2 3include "llvm/Target/Target.td"4include "GlobalISelEmitterCommon.td"5 6def InstTwoOperands : I<(outs GPR32:$dst), (ins GPR32:$src1, GPR32:$src2), []>;7def InstThreeOperands : I<(outs GPR32:$dst), (ins GPR32:$cond, GPR32:$src,GPR32:$src2), []>;8 9// Make sure the GIM_CheckIsSameOperand check is not hoisted into the common header group10 11// CHECK:       GIM_Try, /*On fail goto*//*Label 1*/12// CHECK-NEXT:  GIM_RootCheckRegBankForClass, /*Op*/0, /*RC*/GIMT_Encode2(MyTarget::GPR32RegClassID),13// CHECK-NOT:   GIM_CheckIsSameOperand14// CHECK-NEXT:  GIM_Try, /*On fail goto*//*Label 2*/15// CHECK:       GIM_CheckIsSameOperand, /*MI*/0, /*OpIdx*/3, /*OtherMI*/2, /*OtherOpIdx*/1,16// CHECK:       // Label 217// CHECK-NEXT:  GIM_Try, /*On fail goto*//*Label 3*/18// CHECK:       GIM_CheckIsSameOperand, /*MI*/0, /*OpIdx*/3, /*OtherMI*/2, /*OtherOpIdx*/2,19// CHECK:       // Label 120def : Pat<(i32 (select GPR32:$cond, GPR32:$src1, GPR32:$src2)),21          (InstThreeOperands GPR32:$cond, GPR32:$src1, GPR32:$src2)>;22 23def : Pat<(i32 (select (i32 (setcc GPR32:$cond, (i32 0), (OtherVT SETEQ))),24                      (i32 (add GPR32:$src1, GPR32:$const)),25                       GPR32:$src1)),26          (InstThreeOperands GPR32:$cond, GPR32:$src1, GPR32:$const)>;27