[clang] [Headers][X86] Add a couple of tests for MMX/SSE intrinsics (PR #105852)
Paul T Robinson via cfe-commits
cfe-commits at lists.llvm.org
Mon Aug 26 11:44:00 PDT 2024
================
@@ -0,0 +1,105 @@
+// RUN: %clang_cc1 -triple i386-unknown-unknown -target-feature +mmx \
+// RUN: -target-feature +sse2 -O0 -emit-llvm %s -o - | FileCheck %s
+
+// Test that mmx/sse2 shift intrinsics map to the expected builtins.
+
+// Don't include mm_malloc.h, it's system specific.
+#define __MM_MALLOC_H
+
+#include <x86intrin.h>
+
+__m64 check__mm_slli_pi16(__m64 m) {
+ // CHECK-LABEL: @check__mm_slli_pi16
+ // CHECK: @llvm.x86.sse2.pslli.w(<8 x i16> %{{.*}}, i32 {{.*}})
+ return _mm_slli_pi16(m, 8);
----------------
pogo59 wrote:
You are correct, sorry for not checking!
https://github.com/llvm/llvm-project/pull/105852
More information about the cfe-commits
mailing list