[clang] [CIR] X86 vector fcmp-sse vector builtins (PR #167125)
Andy Kaylor via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 10 10:09:53 PST 2025
================
@@ -0,0 +1,102 @@
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -fclangir -emit-cir %s -o - | FileCheck %s --check-prefix=CIR
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -fclangir -emit-llvm %s -o - | FileCheck %s -check-prefix=LLVM
+// RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu -O2 -emit-llvm %s -o - | FileCheck %s -check-prefix=OGCG
+
+typedef float __m128 __attribute__((__vector_size__(16), __aligned__(16)));
+typedef double __m128d __attribute__((__vector_size__(16), __aligned__(16)));
+
+__m128 test_cmpnleps(__m128 A, __m128 B) {
+ // CIR-LABEL: @test_cmpnleps
+ // CIR: [[CMP:%.*]] = cir.vec.cmp(le, [[A:%.*]], [[B:%.*]]) : !cir.vector<!cir.float x 4>, !cir.vector<!s32i x 4>
----------------
andykaylor wrote:
@woruyu I think `update_cc_test_checks.py` only works for LLVM IR. There is another script, `mlir/utils/generate-test-checks.py` that is intended for genersating MLIR checks, but I have not tried it with CIR. We typically have our tests set up to emit the output to a file, which you can then use to create the checks.
https://github.com/llvm/llvm-project/pull/167125
More information about the cfe-commits
mailing list