[clang] [llvm] [HLSL] Move `normalize` implementation to header files (PR #216228)
Farzon Lotfi via llvm-commits
llvm-commits at lists.llvm.org
Mon Aug 17 06:30:07 PDT 2026
================
@@ -0,0 +1,27 @@
+# RUN: llc -verify-machineinstrs -O0 -mtriple spirv-unknown-unknown -run-pass=spirv-prelegalizer-combiner %s -o - | FileCheck %s
+---
+name: normalize_instcombine_float4
+tracksRegLiveness: true
+legalized: true
+body: |
+ bb.1.entry:
+ ; CHECK-LABEL: name: normalize_instcombine_float4
+ ; CHECK-NOT: %9:_(<4 x s32>) = G_SHUFFLE_VECTOR %8, %5, shufflemask(0, 0, 0, 0)
+ ; CHECK-NOT: %10:id(<4 x s32>) = G_FDIV %2, %9
+ ; CHECK: %10:id(<4 x s32>) = G_INTRINSIC intrinsic(@llvm.spv.normalize), %2(<4 x s32>)
+ %0:type(s64) = OpTypeFloat 32
+ %1:type(s64) = OpTypeVector %0(s64), 4
+ OpName %2(<4 x s32>), 97
+ %3:type(s64) = OpTypeFunction %1(s64), %1(s64)
+ %4:iid(s64) = OpFunction %1(s64), 0, %3(s64)
+ %2:vfid(<4 x s32>) = OpFunctionParameter %1(s64)
+ OpName %4(s64), 1836216174, 2053729377, 1852399461, 1868788851, 1852400237, 1818648421, 880042351, 0
----------------
farzonl wrote:
Can we remove opDecorate and opname for this test. I don’t think they are needed.
https://github.com/llvm/llvm-project/pull/216228
More information about the llvm-commits
mailing list