File tree Expand file tree Collapse file tree 4 files changed +8
-7
lines changed
test/CodeGen/SPIRV/structurizer Expand file tree Collapse file tree 4 files changed +8
-7
lines changed Original file line number Diff line number Diff line change @@ -443,8 +443,8 @@ class SPIRVStructurizer : public FunctionPass {
443443 if (!Inserted) {
444444 // Src already a source node. Cannot have 2 edges from A to B.
445445 // Creating alias source block.
446- BasicBlock *NewSrc =
447- BasicBlock::Create ( F.getContext (), " new.src" , &F);
446+ BasicBlock *NewSrc = BasicBlock::Create (
447+ F.getContext (), Src-> getName () + " . new.src" , &F);
448448 replaceBranchTargets (Src, Dst, NewSrc);
449449 IRBuilder<> Builder (NewSrc);
450450 Builder.CreateBr (Dst);
@@ -473,7 +473,8 @@ class SPIRVStructurizer : public FunctionPass {
473473
474474 std::vector<BasicBlock *> Dsts;
475475 std::unordered_map<BasicBlock *, ConstantInt *> DstToIndex;
476- auto NewExit = BasicBlock::Create (F.getContext (), " new.exit" , &F);
476+ auto NewExit = BasicBlock::Create (F.getContext (),
477+ Header->getName () + " .new.exit" , &F);
477478 IRBuilder<> ExitBuilder (NewExit);
478479 for (auto &[Src, Dst] : FixedEdges) {
479480 if (DstToIndex.count (Dst) != 0 )
Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:
55target triple = "spirv-unknown-vulkan1.3-compute"
66
77define internal spir_func void @main () #3 {
8- ; CHECK-DAG: OpName %[[#switch_0:]] "reg2 "
8+ ; CHECK-DAG: OpName %[[#switch_0:]] "reg1 "
99; CHECK-DAG: OpName %[[#switch_1:]] "reg"
1010
1111; CHECK-DAG: %[[#int_0:]] = OpConstant %[[#]] 0
Original file line number Diff line number Diff line change 1313target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
1414target triple = "spirv-unknown-vulkan1.3-compute"
1515
16- ; CHECK-DAG: OpName %[[#switch_0:]] "reg2 "
16+ ; CHECK-DAG: OpName %[[#switch_0:]] "reg1 "
1717; CHECK-DAG: OpName %[[#variable:]] "var"
1818
1919; CHECK-DAG: %[[#int_0:]] = OpConstant %[[#]] 0
Original file line number Diff line number Diff line change 11; RUN: llc -mtriple=spirv-unknown-vulkan-compute -O0 %s -o - | FileCheck %s
22; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - -filetype=obj | spirv-val %}
33
4- ; CHECK-DAG: OpName %[[#reg_0:]] "reg4 "
5- ; CHECK-DAG: OpName %[[#reg_1:]] "reg2 "
4+ ; CHECK-DAG: OpName %[[#reg_0:]] "reg2 "
5+ ; CHECK-DAG: OpName %[[#reg_1:]] "reg1 "
66
77target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
88target triple = "spirv-unknown-vulkan1.3-compute"
You can’t perform that action at this time.
0 commit comments