222 lines · plain
1;---------------------------------------------------------------------2; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \3; RUN: -check-prefix=IdentPat4; RUN: FileCheck -input-file %s %s -check-prefix=IdentPat5 6__IdentPat7add r10, r1, r28add r11, r3, r49mul r5, r10, r1110__IdentPat11 12; IdentPat: {{^}}__IdentPat13; IdentPat-DAG: {{^}}add [[REG1:r[0-9]+]], {{r[0-9]+}}, {{r[0-9]+}}14; IdentPat-DAG: {{^}}add [[REG2:r[0-9]+]], {{r[0-9]+}}, {{r[0-9]+}}15; IdentPat: {{^}}mul r5, [[REG1]], [[REG2]]16; IdentPat: {{^}}__IdentPat17 18;---------------------------------------------------------------------19; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \20; RUN: -check-prefix=IdentPatNot21; RUN: FileCheck -input-file %s %s -check-prefix=IdentPatNot22 23__IdentPatNot24add r11, r1, r225xor r12, r1, r226add r10, r3, r427mul r5, r10, r1128__IdentPatNot29 30; IdentPatNot: {{^}}__IdentPatNot31; IdentPatNot-DAG: {{^}}add {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}32; IdentPatNot-DAG: {{^}}add {{r[0-9]+}}, {{r[0-9]+}}, {{r[0-9]+}}33; IdentPatNot-NOT: {{^}}xor34; IdentPatNot-DAG: {{^}}mul r5, r10, r1135; IdentPatNot: {{^}}__IdentPatNot36 37;---------------------------------------------------------------------38; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \39; RUN: -check-prefix=IdentPatVarDiff40; RUN: FileCheck -input-file %s %s -check-prefix=IdentPatVarDiff41 42__IdentPatVarDiff43call void @foo(), !dbg !044call void @bar(), !dbg !145!1 = !DILocation(line: 1,46!0 = !DILocation(line: 1,47__IdentPatVarDiff48 49; IdentPatVarDiff: {{^}}__IdentPatVarDiff50; IdentPatVarDiff: {{^}}call void @foo(), !dbg [[DBG0:![0-9]+]]51; IdentPatVarDiff: {{^}}call void @bar(), !dbg [[DBG1:![0-9]+]]52; IdentPatVarDiff-DAG: {{^}}[[DBG0]] = !DILocation(line: 1,53; IdentPatVarDiff-DAG: {{^}}[[DBG1]] = !DILocation(line: 1,54; IdentPatVarDiff: {{^}}__IdentPatVarDiff55 56;---------------------------------------------------------------------57; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \58; RUN: -check-prefix=IdentPatVarSame59; RUN: not FileCheck -input-file %s %s -check-prefix=IdentPatVarSame60 61__IdentPatVarSame62call void @foo(), !dbg !063call void @bar(), !dbg !064!1 = !DILocation(line: 1,65!0 = !DILocation(line: 1,66__IdentPatVarSame67 68; IdentPatVarSame: {{^}}__IdentPatVarSame69; IdentPatVarSame: {{^}}call void @foo(), !dbg [[DBG0:![0-9]+]]70; IdentPatVarSame: {{^}}call void @bar(), !dbg [[DBG1:![0-9]+]]71; IdentPatVarSame-DAG: {{^}}[[DBG0]] = !DILocation(line: 1,72; IdentPatVarSame-DAG: {{^}}[[DBG1]] = !DILocation(line: 1,73; IdentPatVarSame: {{^}}__IdentPatVarSame74 75;---------------------------------------------------------------------76; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \77; RUN: -check-prefix=SupSubSet78; RUN: not FileCheck -input-file %s %s -check-prefix=SupSubSet79 80__SupSubSet81store i64 8, i64* %a82store i64 4, i64* %a83store i64 4, i64* %b84store i64 8, i64* %b85__SupSubSet86 87; SupSubSet: {{^}}__SupSubSet88; SupSubSet-DAG: {{^}}store i64 {{4|8}}, i64* %a89; SupSubSet-DAG: {{^}}store i64 4, i64* %a90; SupSubSet-DAG: {{^}}store i64 {{4|8}}, i64* %b91; SupSubSet-DAG: {{^}}store i64 4, i64* %b92; SupSubSet: {{^}}__SupSubSet93 94;---------------------------------------------------------------------95; RUN: FileCheck -allow-deprecated-dag-overlap -input-file %s %s \96; RUN: -check-prefix=SubSupSet97; RUN: FileCheck -input-file %s %s -check-prefix=SubSupSet98 99__SubSupSet100store i64 8, i64* %a101store i64 4, i64* %a102store i64 4, i64* %b103store i64 8, i64* %b104__SubSupSet105 106; SubSupSet: {{^}}__SubSupSet107; SubSupSet-DAG: {{^}}store i64 4, i64* %a108; SubSupSet-DAG: {{^}}store i64 {{4|8}}, i64* %a109; SubSupSet-DAG: {{^}}store i64 4, i64* %b110; SubSupSet-DAG: {{^}}store i64 {{4|8}}, i64* %b111; SubSupSet: {{^}}__SubSupSet112 113;---------------------------------------------------------------------114; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \115; RUN: -check-prefixes=WrongNumReps116; RUN: not FileCheck -input-file %s %s -check-prefixes=WrongNumReps117;118; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \119; RUN: -check-prefixes=WrongNumReps,WrongNumReps2120; RUN: FileCheck -input-file %s %s \121; RUN: -check-prefixes=WrongNumReps,WrongNumReps2122;123; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \124; RUN: -check-prefixes=WrongNumReps,WrongNumReps2,WrongNumReps3125; RUN: not FileCheck -input-file %s %s \126; RUN: -check-prefixes=WrongNumReps,WrongNumReps2,WrongNumReps3127 128__WrongNumReps1290: task_begin1301: task_begin1310: barrier_begin1321: barrier_begin133__WrongNumReps134 135; WrongNumReps: {{^}}__WrongNumReps136; WrongNumReps-DAG: {{^}}[[THID:[0-9]+]]: task_begin137; WrongNumReps-DAG: {{^}}[[THID]]: barrier_begin138; WrongNumReps2-DAG: {{^}}[[THID:[0-9]+]]: task_begin139; WrongNumReps2-DAG: {{^}}[[THID]]: barrier_begin140; WrongNumReps3-DAG: {{^}}[[THID:[0-9]+]]: task_begin141; WrongNumReps3-DAG: {{^}}[[THID]]: barrier_begin142; WrongNumReps-NEXT: {{^}}__WrongNumReps143 144;---------------------------------------------------------------------145; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \146; RUN: -check-prefix=SameSimple147; RUN: FileCheck -input-file %s %s -check-prefix=SameSimple148 149__SameSimple150(<foo><bar><foo>)151__SameSimple152 153; SameSimple: {{^}}__SameSimple154; SameSimple: {{^}}(155; SameSimple-DAG: <foo>156; SameSimple-DAG: <foo>157; SameSimple-DAG: <bar>158; SameSimple-NOT: <foo>159; SameSimple-SAME: ){{$}}160; SameSimple: {{^}}__SameSimple161 162;---------------------------------------------------------------------163; RUN: not FileCheck -allow-deprecated-dag-overlap -input-file %s %s \164; RUN: -check-prefix=DagNotDag165; RUN: FileCheck -input-file %s %s -check-prefix=DagNotDag166 167Assume we have DAGs, NOTs, DAGs, NOTs, and then DAGs. Let X, Y, and Z be168the DAG groups such that the leading DAGs are x, y, and z. y won't match169overlaps with matches from:170 1711. X. Otherwise, we used to get a spurious reordering complaint (back172 when reordering complaints on DAG-NOT-DAG were still implemented).1732. Y, because y is in Y. To prevent these overlaps, the implementation must be174 careful not to drop y's match from the previous matches list when it drops175 matches from X to save search time.1763. z. This follows by applying rule #1 for z instead of y.177 178__DagNotDag179abcdefgh180abcd181efgh182 183abcd184ab185cd186 187abcd188cd189ab190__DagNotDag191 192; DagNotDag: {{^}}__DagNotDag193;194; X:195; x:DagNotDag-DAG: {{^}}abcdefgh196; DagNotDag-DAG: {{^}}abcd197; DagNotDag-DAG: efgh{{$}}198;199; Reordering complaint if rule #1 is broken.200; DagNotDag-NOT: abcd201; DagNotDag-NOT: efgh202;203; Y:204; y:DagNotDag-DAG: {{^}}abcd205; DagNotDag-DAG: {{^}}ab206; DagNotDag-DAG: cd{{$}}207;208; Matches if rule #2 is broken.209; DagNotDag-NOT: ab210; DagNotDag-NOT: cd211;212; Z:213; z:DagNotDag-DAG: {{^}}abcd214; DagNotDag-DAG: {{^}}ab215; DagNotDag-DAG: cd{{$}}216;217; Matches if rule #3 is broken.218; DagNotDag-NOT: {{^}}ab219; DagNotDag-NOT: {{^}}cd220;221; DagNotDag: {{^}}__DagNotDag222