1 // RUN: not llvm-tblgen -gen-subtarget -I %p/../../include %s 2>&1 | FileCheck %s
3 // Make sure we don't form ReadAdvances with ValidWrites entries that are not
4 // associated with any instructions.
6 include "llvm/Target/Target.td"
10 def WriteX : SchedWrite;
11 def WriteY : SchedWrite;
12 def ReadX : SchedRead;
14 def InstX : Instruction {
15 let OutOperandList = (outs);
16 let InOperandList = (ins);
17 let SchedRW = [WriteX, ReadX];
20 def SchedModelX: SchedMachineModel {
21 let CompleteModel = 0;
24 let SchedModel = SchedModelX in {
25 def : ReadAdvance<ReadX, 1, [WriteX, WriteY]>;
26 // CHECK: error: ReadAdvance referencing a ValidWrite that is not used by any instruction (WriteY)
29 def ProcessorX: ProcessorModel<"ProcessorX", SchedModelX, []>;