brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · 2e03b97 Raw
29 lines · c
1// RUN: %clang_cc1 %s -ffreestanding -triple=x86_64-unknown-unknown -target-feature +sm4 -emit-llvm -o - -Wall -Werror | FileCheck %s2// RUN: %clang_cc1 %s -ffreestanding -triple=i386-unknown-unknown -target-feature +sm4 -emit-llvm -o - -Wall -Werror | FileCheck %s3 4#include <immintrin.h>5 6__m128i test_mm_sm4key4_epi32(__m128i __A, __m128i __B) {7  // CHECK-LABEL: @test_mm_sm4key4_epi32(8  // CHECK: call <4 x i32> @llvm.x86.vsm4key4128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}})9  return _mm_sm4key4_epi32(__A, __B);10}11 12__m256i test_mm256_sm4key4_epi32(__m256i __A, __m256i __B) {13  // CHECK-LABEL: @test_mm256_sm4key4_epi32(14  // CHECK: call <8 x i32> @llvm.x86.vsm4key4256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}})15  return _mm256_sm4key4_epi32(__A, __B);16}17 18__m128i test_mm_sm4rnds4_epi32(__m128i __A, __m128i __B) {19  // CHECK-LABEL: @test_mm_sm4rnds4_epi32(20  // CHECK: call <4 x i32> @llvm.x86.vsm4rnds4128(<4 x i32> %{{.*}}, <4 x i32> %{{.*}})21  return _mm_sm4rnds4_epi32(__A, __B);22}23 24__m256i test_mm256_sm4rnds4_epi32(__m256i __A, __m256i __B) {25  // CHECK-LABEL: @test_mm256_sm4rnds4_epi32(26  // CHECK: call <8 x i32> @llvm.x86.vsm4rnds4256(<8 x i32> %{{.*}}, <8 x i32> %{{.*}})27  return _mm256_sm4rnds4_epi32(__A, __B);28}29