diff --git a/mlir/docs/Dialects/SPIR-V.md b/mlir/docs/Dialects/SPIR-V.md --- a/mlir/docs/Dialects/SPIR-V.md +++ b/mlir/docs/Dialects/SPIR-V.md @@ -90,10 +90,10 @@ ops are mostly for defining the SPIR-V structure. For example, `spv.module` and `spv.constant`. They may correspond to one or more instructions during (de)serialization. -* Ops with `_snake_case` names are those that have no corresponding +* Ops with `mlir.snake_case` names are those that have no corresponding instructions (or concepts) in the binary format. They are introduced to - satisfy MLIR structural requirements. For example, `spv._module_end` and - `spv._merge`. They map to no instructions during (de)serialization. + satisfy MLIR structural requirements. For example, `spv.mlir.module_end` and + `spv.mlir.merge`. They map to no instructions during (de)serialization. (TODO: consider merging the last two cases and adopting `spv.mlir.` prefix for them.) @@ -510,7 +510,7 @@ We introduce a `spv.selection` and `spv.loop` op for structured selections and loops, respectively. The merge targets are the next ops following them. Inside -their regions, a special terminator, `spv._merge` is introduced for branching to +their regions, a special terminator, `spv.mlir.merge` is introduced for branching to the merge target. ### Selection @@ -522,7 +522,7 @@ * The selection header block should be the first block. It should contain the `spv.BranchConditional` or `spv.Switch` op. * The merge block should be the last block. The merge block should only - contain a `spv._merge` op. Any block can branch to the merge block for early + contain a `spv.mlir.merge` op. Any block can branch to the merge block for early exit. ``` @@ -581,7 +581,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } // ... @@ -598,7 +598,7 @@ * The entry block should be the first block and it should jump to the loop header block, which is the second block. * The merge block should be the last block. The merge block should only - contain a `spv._merge` op. Any block except the entry block can branch to + contain a `spv.mlir.merge` op. Any block except the entry block can branch to the merge block for early exit. * The continue block should be the second to last block and it should have a branch to the loop header block. @@ -675,7 +675,7 @@ spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } return } @@ -731,7 +731,7 @@ spv.Return ^merge: - spv._merge + spv.mlir.merge } spv.Return } diff --git a/mlir/docs/SPIRVToLLVMDialectConversion.md b/mlir/docs/SPIRVToLLVMDialectConversion.md --- a/mlir/docs/SPIRVToLLVMDialectConversion.md +++ b/mlir/docs/SPIRVToLLVMDialectConversion.md @@ -665,7 +665,7 @@ spv.Branch ^merge llvm.br ^merge ^merge: ^merge: - spv._merge llvm.br ^continue + spv.mlir.merge llvm.br ^continue } // Remaining code ^continue: // Remaining code @@ -690,7 +690,7 @@ spv.Branch ^header llvm.br ^header ^merge: ^merge: - spv._merge llvm.br ^remaining + spv.mlir.merge llvm.br ^remaining } // Remaining code ^remaining: // Remaining code diff --git a/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td b/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td --- a/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td +++ b/mlir/include/mlir/Dialect/SPIRV/SPIRVControlFlowOps.td @@ -272,7 +272,7 @@ one loop header block, one loop continue block, one loop merge block. The entry block should be the first block and it should jump to the loop header block, which is the second block. The loop merge block should be the - last block. The merge block should only contain a `spv._merge` op. + last block. The merge block should only contain a `spv.mlir.merge` op. The continue block should be the second to last block and it should have a branch to the loop header block. The loop continue block should be the only block, except the entry block, branching to the header block. @@ -302,7 +302,7 @@ Block *getMergeBlock(); // Adds an empty entry block and loop merge block containing one - // spv._merge op. + // spv.mlir.merge op. void addEntryAndMergeBlock(); }]; @@ -313,7 +313,7 @@ // ----- -def SPV_MergeOp : SPV_Op<"_merge", [NoSideEffect, Terminator]> { +def SPV_MergeOp : SPV_Op<"mlir.merge", [NoSideEffect, Terminator]> { let summary = "A special terminator for merging a structured selection/loop."; let description = [{ @@ -435,7 +435,7 @@ The `spv.selection` region should contain at least two blocks: one selection header block, and one selection merge. The selection header block should be the first block. The selection merge block should be the last block. - The merge block should only contain a `spv._merge` op. + The merge block should only contain a `spv.mlir.merge` op. }]; let arguments = (ins @@ -453,7 +453,7 @@ /// Returns the selection merge block. Block *getMergeBlock(); - /// Adds a selection merge block containing one spv._merge op. + /// Adds a selection merge block containing one spv.mlir.merge op. void addMergeBlock(); /// Creates a spv.selection op for `if () then { }` diff --git a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp --- a/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp +++ b/mlir/lib/Dialect/SPIRV/SPIRVOps.cpp @@ -641,7 +641,7 @@ return getElementType(type, indices, errorFn); } -/// Returns true if the given `block` only contains one `spv._merge` op. +/// Returns true if the given `block` only contains one `spv.mlir.merge` op. static inline bool isMergeBlock(Block &block) { return !block.empty() && std::next(block.begin()) == block.end() && isa(block.front()); @@ -2320,7 +2320,7 @@ Block &merge = region.back(); if (!isMergeBlock(merge)) return loopOp.emitOpError( - "last block must be the merge block with only one 'spv._merge' op"); + "last block must be the merge block with only one 'spv.mlir.merge' op"); if (std::next(region.begin()) == region.end()) return loopOp.emitOpError( @@ -2397,12 +2397,12 @@ body().push_back(mergeBlock); OpBuilder builder = OpBuilder::atBlockEnd(mergeBlock); - // Add a spv._merge op into the merge block. + // Add a spv.mlir.merge op into the merge block. builder.create(getLoc()); } //===----------------------------------------------------------------------===// -// spv._merge +// spv.mlir.merge //===----------------------------------------------------------------------===// static LogicalResult verify(spirv::MergeOp mergeOp) { @@ -2697,7 +2697,7 @@ // The last block is the merge block. if (!isMergeBlock(region.back())) return selectionOp.emitOpError( - "last block must be the merge block with only one 'spv._merge' op"); + "last block must be the merge block with only one 'spv.mlir.merge' op"); if (std::next(region.begin()) == region.end()) return selectionOp.emitOpError("must have a selection header block"); @@ -2723,7 +2723,7 @@ body().push_back(mergeBlock); OpBuilder builder = OpBuilder::atBlockEnd(mergeBlock); - // Add a spv._merge op into the merge block. + // Add a spv.mlir.merge op into the merge block. builder.create(getLoc()); } diff --git a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp --- a/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp +++ b/mlir/lib/Dialect/SPIRV/Serialization/Serializer.cpp @@ -1748,7 +1748,7 @@ return failure(); // There is nothing to do for the merge block in the selection, which just - // contains a spv._merge op, itself. But we need to have an OpLabel + // contains a spv.mlir.merge op, itself. But we need to have an OpLabel // instruction to start a new SPIR-V block for ops following this SelectionOp. // The block should use the for the merge block. return encodeInstructionInto(functionBody, spirv::Opcode::OpLabel, {mergeID}); @@ -1808,7 +1808,7 @@ return failure(); // There is nothing to do for the merge block in the loop, which just contains - // a spv._merge op, itself. But we need to have an OpLabel instruction to + // a spv.mlir.merge op, itself. But we need to have an OpLabel instruction to // start a new SPIR-V block for ops following this LoopOp. The block should // use the for the merge block. return encodeInstructionInto(functionBody, spirv::Opcode::OpLabel, {mergeID}); diff --git a/mlir/test/Conversion/GPUToSPIRV/if.mlir b/mlir/test/Conversion/GPUToSPIRV/if.mlir --- a/mlir/test/Conversion/GPUToSPIRV/if.mlir +++ b/mlir/test/Conversion/GPUToSPIRV/if.mlir @@ -25,7 +25,7 @@ // CHECK-NEXT: [[TRUE]]: // CHECK: spv.Branch [[MERGE]] // CHECK-NEXT: [[MERGE]]: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge // CHECK-NEXT: } // CHECK-NEXT: spv.Return @@ -51,7 +51,7 @@ // CHECK-NEXT: [[FALSE_NESTED_TRUE_PATH]]: // CHECK: spv.Branch [[MERGE_NESTED_TRUE_PATH]] // CHECK-NEXT: [[MERGE_NESTED_TRUE_PATH]]: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge // CHECK-NEXT: } // CHECK-NEXT: spv.Branch [[MERGE_TOP:\^.*]] // CHECK-NEXT: [[FALSE_TOP]]: @@ -62,11 +62,11 @@ // CHECK-NEXT: [[FALSE_NESTED_FALSE_PATH]]: // CHECK: spv.Branch [[MERGE_NESTED_FALSE_PATH]] // CHECK: [[MERGE_NESTED_FALSE_PATH]]: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge // CHECK-NEXT: } // CHECK-NEXT: spv.Branch [[MERGE_TOP]] // CHECK-NEXT: [[MERGE_TOP]]: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge // CHECK-NEXT: } // CHECK-NEXT: spv.Return @@ -109,7 +109,7 @@ // CHECK-DAG: spv.Store "Function" %[[VAR2]], %[[RET2FALSE]] : f32 // CHECK: spv.Branch ^[[MERGE]] // CHECK-NEXT: ^[[MERGE]]: - // CHECK: spv._merge + // CHECK: spv.mlir.merge // CHECK-NEXT: } // CHECK-DAG: %[[OUT1:.*]] = spv.Load "Function" %[[VAR1]] : f32 // CHECK-DAG: %[[OUT2:.*]] = spv.Load "Function" %[[VAR2]] : f32 @@ -145,7 +145,7 @@ // CHECK: spv.Store "Function" %[[VAR]], {{%.*}} : !spv.ptr [0])>, StorageBuffer> // CHECK: spv.Branch ^[[MERGE]] // CHECK-NEXT: ^[[MERGE]]: - // CHECK: spv._merge + // CHECK: spv.mlir.merge // CHECK-NEXT: } // CHECK: %[[OUT:.*]] = spv.Load "Function" %[[VAR]] : !spv.ptr [0])>, StorageBuffer> // CHECK: %[[ADD:.*]] = spv.AccessChain %[[OUT]][{{%.*}}, {{%.*}}] : !spv.ptr [0])>, StorageBuffer> diff --git a/mlir/test/Conversion/GPUToSPIRV/loop.mlir b/mlir/test/Conversion/GPUToSPIRV/loop.mlir --- a/mlir/test/Conversion/GPUToSPIRV/loop.mlir +++ b/mlir/test/Conversion/GPUToSPIRV/loop.mlir @@ -43,7 +43,7 @@ // CHECK: %[[INCREMENT:.*]] = spv.IAdd %[[INDVAR]], %[[STEP]] : i32 // CHECK: spv.Branch ^[[HEADER]](%[[INCREMENT]] : i32) // CHECK: ^[[MERGE]] - // CHECK: spv._merge + // CHECK: spv.mlir.merge // CHECK: } scf.for %arg4 = %lb to %ub step %step { %1 = load %arg2[%arg4] : memref<10xf32> @@ -80,7 +80,7 @@ // CHECK-DAG: spv.Store "Function" %[[VAR2]], %[[UPDATED]] : f32 // CHECK: spv.Branch ^[[HEADER]](%[[INCREMENT]], %[[UPDATED]], %[[UPDATED]] : i32, f32, f32) // CHECK: ^[[MERGE]]: - // CHECK: spv._merge + // CHECK: spv.mlir.merge // CHECK: } %result:2 = scf.for %i0 = %lb to %ub step %step iter_args(%si = %s0, %sj = %s1) -> (f32, f32) { %sn = addf %si, %si : f32 diff --git a/mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir b/mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir --- a/mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir +++ b/mlir/test/Conversion/LinalgToSPIRV/linalg-to-spirv.mlir @@ -40,7 +40,7 @@ // CHECK: spv.AtomicIAdd "Device" "AcquireRelease" %[[OUTPTR]], %[[ADD]] // CHECK: spv.Branch ^bb2 // CHECK: ^bb2: -// CHECK: spv._merge +// CHECK: spv.mlir.merge // CHECK: } // CHECK: spv.Return diff --git a/mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir b/mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir --- a/mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir +++ b/mlir/test/Conversion/SPIRVToLLVM/control-flow-ops-to-llvm.mlir @@ -112,7 +112,7 @@ // Do nothing spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -138,7 +138,7 @@ spv.selection { spv.BranchConditional %cond, ^merge, ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -156,7 +156,7 @@ // CHECK: ^bb2: ^merge: // CHECK: llvm.br ^bb3 - spv._merge + spv.mlir.merge } // CHECK: ^bb3: // CHECK-NEXT: llvm.return @@ -180,7 +180,7 @@ // CHECK: ^bb3: ^merge: // CHECK: llvm.br ^bb4 - spv._merge + spv.mlir.merge } // CHECK: ^bb4: // CHECK-NEXT: llvm.return @@ -200,7 +200,7 @@ // CHECK: ^bb2: ^merge: // CHECK: llvm.br ^bb3 - spv._merge + spv.mlir.merge } // CHECK: ^bb3: %one = spv.constant 1 : i32 diff --git a/mlir/test/Dialect/SPIRV/Serialization/debug.mlir b/mlir/test/Dialect/SPIRV/Serialization/debug.mlir --- a/mlir/test/Dialect/SPIRV/Serialization/debug.mlir +++ b/mlir/test/Dialect/SPIRV/Serialization/debug.mlir @@ -101,7 +101,7 @@ spv.Branch ^header ^merge: // CHECK: loc({{".*debug.mlir"}}:85:7) - spv._merge + spv.mlir.merge // CHECK: loc({{".*debug.mlir"}}:85:7) } // CHECK: loc({{".*debug.mlir"}}:108:7) @@ -114,7 +114,7 @@ spv.Branch ^header ^merge: // CHECK: loc({{".*debug.mlir"}}:75:5) - spv._merge + spv.mlir.merge // CHECK: loc({{".*debug.mlir"}}:75:5) } spv.Return @@ -138,7 +138,7 @@ spv.Branch ^merge ^merge: // CHECK: loc({{".*debug.mlir"}}:128:5) - spv._merge + spv.mlir.merge // CHECK: loc({{".*debug.mlir"}}:128:5) } spv.Return diff --git a/mlir/test/Dialect/SPIRV/Serialization/function-call.mlir b/mlir/test/Dialect/SPIRV/Serialization/function-call.mlir --- a/mlir/test/Dialect/SPIRV/Serialization/function-call.mlir +++ b/mlir/test/Dialect/SPIRV/Serialization/function-call.mlir @@ -39,7 +39,7 @@ spv.FunctionCall @f_inc(%var) : (!spv.ptr) -> () spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } spv.Return } diff --git a/mlir/test/Dialect/SPIRV/Serialization/loop.mlir b/mlir/test/Dialect/SPIRV/Serialization/loop.mlir --- a/mlir/test/Dialect/SPIRV/Serialization/loop.mlir +++ b/mlir/test/Dialect/SPIRV/Serialization/loop.mlir @@ -44,9 +44,9 @@ spv.Branch ^header // CHECK-NEXT: ^bb4: -// CHECK-NEXT: spv._merge +// CHECK-NEXT: spv.mlir.merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -94,8 +94,8 @@ spv.Branch ^header(%14 : i32) // CHECK-NEXT: ^bb3: ^merge: -// CHECK-NEXT: spv._merge - spv._merge +// CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } spv.Return } @@ -174,8 +174,8 @@ // CHECK-NEXT: ^bb4: ^merge: -// CHECK-NEXT: spv._merge - spv._merge +// CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } // end inner loop // CHECK: spv.Branch ^bb4 @@ -194,9 +194,9 @@ spv.Branch ^header // CHECK-NEXT: ^bb5: -// CHECK-NEXT: spv._merge +// CHECK-NEXT: spv.mlir.merge ^merge: - spv._merge + spv.mlir.merge } // end outer loop spv.Return } diff --git a/mlir/test/Dialect/SPIRV/Serialization/phi.mlir b/mlir/test/Dialect/SPIRV/Serialization/phi.mlir --- a/mlir/test/Dialect/SPIRV/Serialization/phi.mlir +++ b/mlir/test/Dialect/SPIRV/Serialization/phi.mlir @@ -142,8 +142,8 @@ // CHECK-NEXT: ^bb4: ^merge: -// CHECK-NEXT: spv._merge - spv._merge +// CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } spv.Return } @@ -218,8 +218,8 @@ spv.Branch ^bb1(%48 : i32) // CHECK: ^[[LP2_MG]]: ^bb3: -// CHECK: spv._merge - spv._merge +// CHECK: spv.mlir.merge + spv.mlir.merge } // CHECK: %[[ADD2:.*]] = spv.IAdd %[[LP1_HDR_ARG]] %36 = spv.IAdd %32, %31 : i32 @@ -227,8 +227,8 @@ spv.Branch ^bb1(%36 : i32) // CHECK: ^[[LP1_MG]]: ^bb3: -// CHECK: spv._merge - spv._merge +// CHECK: spv.mlir.merge + spv.mlir.merge } spv.Return } @@ -261,7 +261,7 @@ %loop1_add = spv.IAdd %loop1_bb_arg, %cst4 : i32 spv.Branch ^bb1(%loop1_add : i32) ^bb3: - spv._merge + spv.mlir.merge } // CHECK: spv.constant 44 @@ -277,7 +277,7 @@ %loop2_add = spv.IAdd %loop2_bb_arg, %cst4 : i32 spv.Branch ^bb1(%loop2_add : i32) ^bb3: - spv._merge + spv.mlir.merge } spv.Return diff --git a/mlir/test/Dialect/SPIRV/Serialization/selection.mlir b/mlir/test/Dialect/SPIRV/Serialization/selection.mlir --- a/mlir/test/Dialect/SPIRV/Serialization/selection.mlir +++ b/mlir/test/Dialect/SPIRV/Serialization/selection.mlir @@ -36,8 +36,8 @@ // CHECK-NEXT: ^bb3: ^merge: -// CHECK-NEXT: spv._merge - spv._merge +// CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } spv.Return @@ -72,8 +72,8 @@ // CHECK: ^bb2: ^merge: -// CHECK-NEXT: spv._merge - spv._merge +// CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } %one = spv.constant 1 : i32 diff --git a/mlir/test/Dialect/SPIRV/Transforms/inlining.mlir b/mlir/test/Dialect/SPIRV/Transforms/inlining.mlir --- a/mlir/test/Dialect/SPIRV/Transforms/inlining.mlir +++ b/mlir/test/Dialect/SPIRV/Transforms/inlining.mlir @@ -74,7 +74,7 @@ ^then: spv.Return ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -97,7 +97,7 @@ ^then: spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -111,7 +111,7 @@ // CHECK-NEXT: ^bb1: // CHECK-NEXT: spv.Branch ^bb2 // CHECK-NEXT: ^bb2: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge spv.FunctionCall @callee(%0) : (i1) -> () spv.Return } @@ -130,7 +130,7 @@ ^continue: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -157,7 +157,7 @@ ^continue: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -175,7 +175,7 @@ // CHECK-NEXT: ^bb3: // CHECK-NEXT: spv.Branch ^bb1 // CHECK-NEXT: ^bb4: - // CHECK-NEXT: spv._merge + // CHECK-NEXT: spv.mlir.merge spv.FunctionCall @callee(%0) : (i1) -> () spv.Return } @@ -211,7 +211,7 @@ spv.FunctionCall @atomic_add(%5, %7) : (i32, !spv.ptr) -> () spv.Branch ^bb2 ^bb2 : // 2 preds: ^bb0, ^bb1 - spv._merge + spv.mlir.merge } // CHECK: spv.Return spv.Return diff --git a/mlir/test/Dialect/SPIRV/canonicalize.mlir b/mlir/test/Dialect/SPIRV/canonicalize.mlir --- a/mlir/test/Dialect/SPIRV/canonicalize.mlir +++ b/mlir/test/Dialect/SPIRV/canonicalize.mlir @@ -507,7 +507,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -538,7 +538,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -575,7 +575,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -611,7 +611,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -643,7 +643,7 @@ spv.Branch ^then ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -675,7 +675,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -707,7 +707,7 @@ spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } spv.Return } diff --git a/mlir/test/Dialect/SPIRV/control-flow-ops.mlir b/mlir/test/Dialect/SPIRV/control-flow-ops.mlir --- a/mlir/test/Dialect/SPIRV/control-flow-ops.mlir +++ b/mlir/test/Dialect/SPIRV/control-flow-ops.mlir @@ -300,7 +300,7 @@ // CHECK-NEXT: ^bb4: ^merge: - spv._merge + spv.mlir.merge } return } @@ -328,7 +328,7 @@ // ----- func @wrong_merge_block() -> () { - // expected-error @+1 {{last block must be the merge block with only one 'spv._merge' op}} + // expected-error @+1 {{last block must be the merge block with only one 'spv.mlir.merge' op}} spv.loop { spv.Return } @@ -340,7 +340,7 @@ func @missing_entry_block() -> () { // expected-error @+1 {{must have an entry block branching to the loop header block}} spv.loop { - spv._merge + spv.mlir.merge } return } @@ -353,7 +353,7 @@ ^entry: spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } return } @@ -368,7 +368,7 @@ ^header: spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } return } @@ -383,7 +383,7 @@ ^header: spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } return } @@ -400,7 +400,7 @@ ^continue: spv.Branch ^merge ^merge: - spv._merge + spv.mlir.merge } return } @@ -419,7 +419,7 @@ ^cont2: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } return } @@ -427,12 +427,12 @@ // ----- //===----------------------------------------------------------------------===// -// spv._merge +// spv.mlir.merge //===----------------------------------------------------------------------===// func @merge() -> () { // expected-error @+1 {{expected parent op to be 'spv.selection' or 'spv.loop'}} - spv._merge + spv.mlir.merge } // ----- @@ -448,10 +448,10 @@ ^then: spv.Store "Function" %var, %one : i32 // expected-error @+1 {{can only be used in the last block of 'spv.selection' or 'spv.loop'}} - spv._merge + spv.mlir.merge ^merge: - spv._merge + spv.mlir.merge } spv.Return @@ -467,11 +467,11 @@ spv.BranchConditional %true, ^body, ^merge ^body: // expected-error @+1 {{can only be used in the last block of 'spv.selection' or 'spv.loop'}} - spv._merge + spv.mlir.merge ^continue: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } return } @@ -490,7 +490,7 @@ // CHECK: spv.Return spv.Return ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -507,7 +507,7 @@ ^continue: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } spv.Return } @@ -545,7 +545,7 @@ // expected-error @+1 {{cannot be used in functions returning value}} spv.Return ^merge: - spv._merge + spv.mlir.merge } %zero = spv.constant 0: i32 @@ -574,7 +574,7 @@ // CHECK: spv.ReturnValue spv.ReturnValue %zero : i32 ^merge: - spv._merge + spv.mlir.merge } %one = spv.constant 1 : i32 spv.ReturnValue %one : i32 @@ -593,7 +593,7 @@ ^continue: spv.Branch ^header ^merge: - spv._merge + spv.mlir.merge } %one = spv.constant 1 : i32 spv.ReturnValue %one : i32 @@ -644,7 +644,7 @@ // expected-error @+1 {{op returns 1 value but enclosing function requires 0 results}} spv.ReturnValue %cst: i32 ^merge: - spv._merge + spv.mlir.merge } spv.Return @@ -675,8 +675,8 @@ // CHECK: ^bb2 ^merge: - // CHECK-NEXT: spv._merge - spv._merge + // CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } spv.Return @@ -709,8 +709,8 @@ // CHECK: ^bb3 ^merge: - // CHECK-NEXT: spv._merge - spv._merge + // CHECK-NEXT: spv.mlir.merge + spv.mlir.merge } spv.Return @@ -739,7 +739,7 @@ // ----- func @wrong_merge_block() -> () { - // expected-error @+1 {{last block must be the merge block with only one 'spv._merge' op}} + // expected-error @+1 {{last block must be the merge block with only one 'spv.mlir.merge' op}} spv.selection { spv.Return } @@ -751,7 +751,7 @@ func @missing_entry_block() -> () { // expected-error @+1 {{must have a selection header block}} spv.selection { - spv._merge + spv.mlir.merge } return }