Debian Codegraph @

llvm/test/CodeGen/SPIRV/GlobalISel/InstCombine/prelegalizercombiner-length-to-distance.mir

raw
1 # RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown -run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
2 # REQUIRES: asserts
3 ---
4 name: distance_instcombine_float4
5 tracksRegLiveness: true
6 legalized: true
7 body: |
8 bb.1.entry:
9 ; CHECK-LABEL: name: distance_instcombine_float4
10 ; CHECK-NOT: %6:_(<4 x s32>) = G_FSUB %2, %3
11 ; CHECK-NOT: %7:id(s32) = G_INTRINSIC intrinsic(@llvm.spv.length), %6(<4 x s32>)
12 ; CHECK: %7:id(s32) = G_INTRINSIC intrinsic(@llvm.spv.distance), %2(<4 x s32>), %3(<4 x s32>)
13 %0:type(s64) = OpTypeFloat 32
14 %1:type(s64) = OpTypeVector %0(s64), 4
15 OpName %2(<4 x s32>), 97
16 OpName %3(<4 x s32>), 98
17 %4:type(s64) = OpTypeFunction %0(s64), %1(s64), %1(s64)
18 %5:iid(s64) = OpFunction %0(s64), 0, %4(s64)
19 %2:vfid(<4 x s32>) = OpFunctionParameter %1(s64)
20 %3:vfid(<4 x s32>) = OpFunctionParameter %1(s64)
21 OpName %5(s64), 1953720676, 1701015137, 1936615775, 1836016500, 1701734754, 1869375071, 3437665
22 OpDecorate %5(s64), 41, 1953720676, 1701015137, 1936615775, 1836016500, 1701734754, 1869375071, 3437665, 0
23 %6:_(<4 x s32>) = G_FSUB %2, %3
24 %7:id(s32) = G_INTRINSIC intrinsic(@llvm.spv.length), %6(<4 x s32>)
25 OpReturnValue %7(s32)
26