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 {
443
443
if (!Inserted) {
444
444
// Src already a source node. Cannot have 2 edges from A to B.
445
445
// 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);
448
448
replaceBranchTargets (Src, Dst, NewSrc);
449
449
IRBuilder<> Builder (NewSrc);
450
450
Builder.CreateBr (Dst);
@@ -473,7 +473,8 @@ class SPIRVStructurizer : public FunctionPass {
473
473
474
474
std::vector<BasicBlock *> Dsts;
475
475
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);
477
478
IRBuilder<> ExitBuilder (NewExit);
478
479
for (auto &[Src, Dst] : FixedEdges) {
479
480
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:
5
5
target triple = "spirv-unknown-vulkan1.3-compute"
6
6
7
7
define internal spir_func void @main () #3 {
8
- ; CHECK-DAG: OpName %[[#switch_0:]] "reg2 "
8
+ ; CHECK-DAG: OpName %[[#switch_0:]] "reg1 "
9
9
; CHECK-DAG: OpName %[[#switch_1:]] "reg"
10
10
11
11
; CHECK-DAG: %[[#int_0:]] = OpConstant %[[#]] 0
Original file line number Diff line number Diff line change 13
13
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
14
14
target triple = "spirv-unknown-vulkan1.3-compute"
15
15
16
- ; CHECK-DAG: OpName %[[#switch_0:]] "reg2 "
16
+ ; CHECK-DAG: OpName %[[#switch_0:]] "reg1 "
17
17
; CHECK-DAG: OpName %[[#variable:]] "var"
18
18
19
19
; CHECK-DAG: %[[#int_0:]] = OpConstant %[[#]] 0
Original file line number Diff line number Diff line change 1
1
; RUN: llc -mtriple=spirv-unknown-vulkan-compute -O0 %s -o - | FileCheck %s
2
2
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv-unknown-vulkan-compute %s -o - -filetype=obj | spirv-val %}
3
3
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 "
6
6
7
7
target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-G1"
8
8
target triple = "spirv-unknown-vulkan1.3-compute"
You can’t perform that action at this time.
0 commit comments