brintos

brintos / llvm-project-archived public Read only

0
0
Text · 944 B · 2ecdddc Raw
26 lines · plain
1; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv64-unknown-unknown %s -o - | FileCheck %s2; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv64-unknown-unknown %s -o - -filetype=obj | spirv-val %}3 4; This test checks that basic blocks are reordered in SPIR-V so that dominators5; are emitted ahead of their dominated blocks as required by the SPIR-V6; specification.7 8; CHECK-DAG: OpName %[[#ENTRY:]] "entry"9; CHECK-DAG: OpName %[[#FOR_BODY137_LR_PH:]] "for.body137.lr.ph"10; CHECK-DAG: OpName %[[#FOR_BODY:]] "for.body"11 12; CHECK: %[[#ENTRY]] = OpLabel13; CHECK: %[[#FOR_BODY]] = OpLabel14; CHECK: %[[#FOR_BODY137_LR_PH]] = OpLabel15 16define spir_kernel void @test(ptr addrspace(1) %arg, i1 %cond) {17entry:18  br label %for.body19 20for.body137.lr.ph:                                ; preds = %for.body21  ret void22 23for.body:                                         ; preds = %for.body, %entry24  br i1 %cond, label %for.body, label %for.body137.lr.ph25}26