[llvm] 18e5a2d - [NFC][SPIR-V] Re-enable scalar fneg arithmetic test (#198204)
via llvm-commits
llvm-commits at lists.llvm.org
Mon May 18 05:39:40 PDT 2026
Author: Arseniy Obolenskiy
Date: 2026-05-18T14:39:35+02:00
New Revision: 18e5a2dbb47065dd4d9870d71431d715aa76bc14
URL: https://github.com/llvm/llvm-project/commit/18e5a2dbb47065dd4d9870d71431d715aa76bc14
DIFF: https://github.com/llvm/llvm-project/commit/18e5a2dbb47065dd4d9870d71431d715aa76bc14.diff
LOG: [NFC][SPIR-V] Re-enable scalar fneg arithmetic test (#198204)
Added:
Modified:
llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll
Removed:
################################################################################
diff --git a/llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll b/llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll
index bdad95a1615bc..e0679fa6ba7c9 100644
--- a/llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll
+++ b/llvm/test/CodeGen/SPIRV/instructions/scalar-floating-point-arithmetic.ll
@@ -1,7 +1,7 @@
; RUN: llc -verify-machineinstrs -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s
; RUN: %if spirv-tools %{ llc -O0 -mtriple=spirv32-unknown-unknown %s -o - -filetype=obj | spirv-val %}
-; DISABLED-CHECK-DAG: OpName [[SCALAR_FNEG:%.+]] "scalar_fneg"
+; CHECK-DAG: OpName [[SCALAR_FNEG:%.+]] "scalar_fneg"
; CHECK-DAG: OpName [[SCALAR_FADD:%.+]] "scalar_fadd"
; CHECK-DAG: OpName [[SCALAR_FSUB:%.+]] "scalar_fsub"
; CHECK-DAG: OpName [[SCALAR_FMUL:%.+]] "scalar_fmul"
@@ -19,20 +19,18 @@
;; Test fneg on scalar:
-;; FIXME: Uncomment this test once we have rebased onto a more recent LLVM
-;; version -- IRTranslator::translateFNeg was fixed.
-;; define float @scalar_fneg(float %a, float %unused) {
-;; %c = fneg float %a
-;; ret float %c
-;; }
-
-; DISABLED-CHECK: [[SCALAR_FNEG]] = OpFunction [[SCALAR]] None [[SCALAR_FN]]
-; DISABLED-CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[SCALAR]]
-; DISABLED-CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[SCALAR]]
-; DISABLED-CHECK: OpLabel
-; DISABLED-CHECK: [[C:%.+]] = OpFNegate [[SCALAR]] [[A]]
-; DISABLED-CHECK: OpReturnValue [[C]]
-; DISABLED-CHECK-NEXT: OpFunctionEnd
+define float @scalar_fneg(float %a, float %unused) {
+ %c = fneg float %a
+ ret float %c
+}
+
+; CHECK: [[SCALAR_FNEG]] = OpFunction [[SCALAR]] None [[SCALAR_FN]]
+; CHECK-NEXT: [[A:%.+]] = OpFunctionParameter [[SCALAR]]
+; CHECK-NEXT: [[B:%.+]] = OpFunctionParameter [[SCALAR]]
+; CHECK: OpLabel
+; CHECK: [[C:%.+]] = OpFNegate [[SCALAR]] [[A]]
+; CHECK: OpReturnValue [[C]]
+; CHECK-NEXT: OpFunctionEnd
;; Test fadd on scalar:
More information about the llvm-commits
mailing list