[llvm] [NFC] New test for untested SPIRVInstructionSelector case (PR #186069)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Mar 12 05:09:14 PDT 2026
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-backend-spir-v
Author: None (ambergorzynski)
<details>
<summary>Changes</summary>
[This line](https://github.com/ambergorzynski/llvm-project/blob/main/llvm/lib/Target/SPIRV/SPIRVInstructionSelector.cpp#L2454) is untested by the existing test suite (checked using coverage and inserting an `abort` at that line).
We propose a new test for the untested logical `eq` case, similarly to the `neq` case added [here](https://github.com/llvm/llvm-project/commit/e45c8b6555c866cd0412b42fce0439e927ca3ba2).
---
Full diff: https://github.com/llvm/llvm-project/pull/186069.diff
1 Files Affected:
- (modified) llvm/test/CodeGen/SPIRV/instructions/icmp.ll (+12)
``````````diff
diff --git a/llvm/test/CodeGen/SPIRV/instructions/icmp.ll b/llvm/test/CodeGen/SPIRV/instructions/icmp.ll
index 0d8778af9e5b0..13e4fd2d3d5f2 100644
--- a/llvm/test/CodeGen/SPIRV/instructions/icmp.ll
+++ b/llvm/test/CodeGen/SPIRV/instructions/icmp.ll
@@ -23,6 +23,7 @@
; CHECK-DAG: OpName [[v3UGE:%.*]] "test_v3_uge"
; CHECK-DAG: OpName [[v3SGE:%.*]] "test_v3_sge"
; CHECK-DAG: OpName [[v16NE:%.*]] "test_v16_ne"
+; CHECK-DAG: OpName [[v16EQ:%.*]] "test_v16_eq"
; CHECK: [[EQ]] = OpFunction
; CHECK-NEXT: [[A:%.*]] = OpFunctionParameter
@@ -274,3 +275,14 @@ define spir_func <16 x i1> @test_v16_ne() {
%A = icmp ne <16 x i1> zeroinitializer, zeroinitializer
ret <16 x i1> %A
}
+
+; CHECK: [[v16EQ]] = OpFunction
+; CHECK-NEXT: OpLabel
+; CHECK-NEXT: [[R:%.*]] = OpLogicalEqual {{%.+}} {{%.*}} {{%.*}}
+; CHECK-NEXT: OpReturnValue [[R]]
+; CHECK-NEXT: OpFunctionEnd
+define spir_func <16 x i1> @test_v16_eq() {
+entry:
+ %A = icmp eq <16 x i1> zeroinitializer, zeroinitializer
+ ret <16 x i1> %A
+}
``````````
</details>
https://github.com/llvm/llvm-project/pull/186069
More information about the llvm-commits
mailing list