|
1 | 1 | // RUN: llvm-tblgen -gen-global-isel -optimize-match-table=false -I %p/../../../include -I %p/../Common %s | FileCheck %s |
| 2 | +// RUN: llvm-tblgen -gen-global-isel -optimize-match-table=true -I %p/../../../include -I %p/../Common %s | FileCheck -check-prefix=OPT %s |
2 | 3 |
|
3 | 4 | include "llvm/Target/Target.td" |
4 | 5 | include "GlobalISelEmitterCommon.td" |
@@ -45,6 +46,32 @@ def aligned_store: PatFrag<(ops node:$v, node:$a), (store $v, $a), [{ |
45 | 46 | // CHECK-NEXT: GIR_RootConstrainSelectedInstOperands, |
46 | 47 | // CHECK-NEXT: // GIR_Coverage, 1, |
47 | 48 |
|
| 49 | +// OPT: GIM_Try, /*On fail goto*//*Label 0*/ GIMT_Encode4(72), |
| 50 | +// OPT-NEXT: GIM_CheckOpcode, /*MI*/0, GIMT_Encode2(TargetOpcode::G_STORE), |
| 51 | +// OPT-NEXT: GIM_RootCheckType, /*Op*/0, /*Type*/GILLT_s32, |
| 52 | +// OPT-NEXT: GIM_CheckAtomicOrdering, /*MI*/0, /*Order*/(uint8_t)AtomicOrdering::NotAtomic, |
| 53 | +// OPT-NEXT: GIM_CheckMemorySizeEqualToLLT, /*MI*/0, /*MMO*/0, /*OpIdx*/0, |
| 54 | + |
| 55 | +// OPT-NEXT: GIM_Try, /*On fail goto*//*Label 1*/ GIMT_Encode4(47), // Rule ID 0 // |
| 56 | +// OPT-NEXT: GIM_RootCheckRegBankForClass, /*Op*/0, /*RC*/GIMT_Encode2(MyTarget::GPR32RegClassID), |
| 57 | +// OPT-NEXT: // MIs[0] src1 |
| 58 | +// OPT-NEXT: GIM_CheckPointerToAny, /*MI*/0, /*Op*/1, /*SizeInBits*/32, |
| 59 | +// OPT-NEXT: GIM_RootCheckRegBankForClass, /*Op*/1, /*RC*/GIMT_Encode2(MyTarget::GPR32RegClassID), |
| 60 | +// OPT-NEXT: GIM_CheckCxxInsnPredicate, /*MI*/0, /*FnId*/GIMT_Encode2(GICXXPred_MI_Predicate_aligned_store), |
| 61 | +// OPT-NEXT: // (st GPR32:{ *:[i32] }:$src0, GPR32:{ *:[i32] }:$src1)<<P:Predicate_unindexedstore>><<P:Predicate_store>><<P:Predicate_aligned_store>> => (MOVALIGNED GPR32:{ *:[i32] }:$src0, GPR32:{ *:[i32] }:$src1) |
| 62 | +// OPT-NEXT: GIR_MutateOpcode, /*InsnID*/0, /*RecycleInsnID*/0, /*Opcode*/GIMT_Encode2(MyTarget::MOVALIGNED), |
| 63 | +// OPT-NEXT: GIR_RootConstrainSelectedInstOperands, |
| 64 | +// OPT-NEXT: // GIR_Coverage, 0, |
| 65 | + |
| 66 | +// OPT: GIM_Try, /*On fail goto*//*Label 2*/ GIMT_Encode4(71), // Rule ID 1 // |
| 67 | +// OPT-NEXT: GIM_RootCheckRegBankForClass, /*Op*/0, /*RC*/GIMT_Encode2(MyTarget::GPR32RegClassID), |
| 68 | +// OPT-NEXT: // MIs[0] src1 |
| 69 | +// OPT-NEXT: GIM_CheckPointerToAny, /*MI*/0, /*Op*/1, /*SizeInBits*/32, |
| 70 | +// OPT-NEXT: GIM_RootCheckRegBankForClass, /*Op*/1, /*RC*/GIMT_Encode2(MyTarget::GPR32RegClassID), |
| 71 | +// OPT-NEXT: // (st GPR32:{ *:[i32] }:$src0, GPR32:{ *:[i32] }:$src1)<<P:Predicate_unindexedstore>><<P:Predicate_store>> => (MOVUNALIGNED GPR32:{ *:[i32] }:$src0, GPR32:{ *:[i32] }:$src1) |
| 72 | +// OPT-NEXT: GIR_MutateOpcode, /*InsnID*/0, /*RecycleInsnID*/0, /*Opcode*/GIMT_Encode2(MyTarget::MOVUNALIGNED), |
| 73 | +// OPT-NEXT: GIR_RootConstrainSelectedInstOperands, |
| 74 | +// OPT-NEXT: // GIR_Coverage, 1, |
48 | 75 |
|
49 | 76 | def MOVALIGNED : I<(outs), (ins GPR32:$src0, GPR32:$src1), |
50 | 77 | [(aligned_store GPR32:$src0, GPR32:$src1)]>; |
|
0 commit comments