[flang] Fix crash in HLFIR generation (#118399)
[llvm-project.git] / clang / test / CodeGen / attr-target-x86-mmx.c
blob39b26619475af2c878ad101f757bf3fe195b2a03
1 // RUN: %clang_cc1 -triple i386-linux-gnu -emit-llvm %s -o - | FileCheck %s
2 // Picking a cpu that doesn't have sse by default so we can enable it later.
4 #define __MM_MALLOC_H
6 #include <x86intrin.h>
8 void __attribute__((target("sse2"))) shift(__m64 a, __m64 b, int c) {
9 _mm_slli_pi16(a, c);
10 _mm_slli_pi32(a, c);
11 _mm_slli_si64(a, c);
13 _mm_srli_pi16(a, c);
14 _mm_srli_pi32(a, c);
15 _mm_srli_si64(a, c);
17 _mm_srai_pi16(a, c);
18 _mm_srai_pi32(a, c);
21 // CHECK: "target-features"="+cx8,+mmx,+sse,+sse2,+x87"