[llvm] [SDAG][X86] Extend SplitVecOp_VSETCC for STRICT_FSETCC. (PR #92509)

Freddy Ye via llvm-commits llvm-commits at lists.llvm.org
Fri May 17 01:43:36 PDT 2024


================
@@ -0,0 +1,22 @@
+; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py
+; RUN: llc < %s -mtriple=x86_64 -mcpu=skx | FileCheck %s --check-prefixes=SKX
+
+; Test not crash for 512 targets but not prefer 512 vector width
+define <16 x i32> @test_v16f32_oeq_q(<16 x i32> %a, <16 x i32> %b, <16 x float> %f1, <16 x float> %f2) #0 {
+; SKX-LABEL: test_v16f32_oeq_q:
+; SKX:       # %bb.0:
+; SKX-NEXT:    vcmpeqps %ymm7, %ymm5, %k1
+; SKX-NEXT:    vcmpeqps %ymm6, %ymm4, %k2
+; SKX-NEXT:    vpblendmd %ymm0, %ymm2, %ymm0 {%k2}
+; SKX-NEXT:    vpblendmd %ymm1, %ymm3, %ymm1 {%k1}
+; SKX-NEXT:    retq
+  %cond = call <16 x i1> @llvm.experimental.constrained.fcmp.v16f32(
+                                               <16 x float> %f1, <16 x float> %f2, metadata !"oeq",
+                                               metadata !"fpexcept.strict") #0
+  %res = select <16 x i1> %cond, <16 x i32> %a, <16 x i32> %b
+  ret <16 x i32> %res
+}
+
----------------
FreddyLeaf wrote:

[7ff5d8d](https://github.com/llvm/llvm-project/pull/92509/commits/7ff5d8dbb0e9a6d4e2f64542fbfd3e352a7bbf6e)

https://github.com/llvm/llvm-project/pull/92509


More information about the llvm-commits mailing list