forked from llvm/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm-tblgen] Increase Coverage Index Size (llvm#118329)
- Loading branch information
Showing
4 changed files
with
46 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
// RUN: llvm-tblgen -gen-dag-isel -instrument-coverage -I %p/../../include %s | FileCheck %s | ||
|
||
include "llvm/Target/Target.td" | ||
|
||
def TestTargetInstrInfo : InstrInfo; | ||
|
||
def TestTarget : Target { | ||
let InstructionSet = TestTargetInstrInfo; | ||
} | ||
|
||
def REG : Register<"REG">; | ||
def GPR : RegisterClass<"TestTarget", [i32], 32, (add REG)>; | ||
|
||
// CHECK-LABEL: OPC_CheckOpcode, TARGET_VAL(ISD::UDIVREM) | ||
// CHECK: OPC_EmitNode2None, TARGET_VAL(::INSTR) | ||
// CHECK-NEXT: Results = #2 #3 | ||
// CHECK-NEXT: OPC_Coverage, COVERAGE_IDX_VAL(0), | ||
// CHECK-NEXT: OPC_CompleteMatch, 2, 3, 2 | ||
def INSTR : Instruction { | ||
let OutOperandList = (outs GPR:$r1, GPR:$r0); | ||
let InOperandList = (ins GPR:$t0, GPR:$t1); | ||
let Pattern = [(set i32:$r0, i32:$r1, (udivrem i32:$t0, i32:$t1))]; | ||
} | ||
|
||
|
||
// CHECK: getPatternForIndex(unsigned Index) | ||
// CHECK: static const char *PATTERN_MATCH_TABLE[] | ||
// CHECK: return StringRef(PATTERN_MATCH_TABLE[Index]); | ||
|
||
// CHECK: getIncludePathForIndex(unsigned Index) | ||
// CHECK: static const char *INCLUDE_PATH_TABLE[] | ||
// CHECK: return StringRef(INCLUDE_PATH_TABLE[Index]); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters