brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.4 KiB · d9a97d2 Raw
42 lines · plain
1; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py2; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9.0 -mattr=+avx | FileCheck %s3 4; Check that we properly upgrade the AVX vbroadcast intrinsics to IR.  The5; expectation is that we should still get the original instruction back that6; maps to the intrinsic.7 8target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"9 10define <4 x float> @test_mm_broadcast_ss(ptr readonly %__a){11; CHECK-LABEL: test_mm_broadcast_ss:12; CHECK:       ## %bb.0: ## %entry13; CHECK-NEXT:    vbroadcastss (%rdi), %xmm014; CHECK-NEXT:    retq15entry:16  %0 = tail call <4 x float> @llvm.x86.avx.vbroadcast.ss(ptr %__a)17  ret <4 x float> %018}19declare <8 x float> @llvm.x86.avx.vbroadcast.ss.256(ptr)20 21define <4 x double> @test_mm256_broadcast_sd(ptr readonly %__a) {22; CHECK-LABEL: test_mm256_broadcast_sd:23; CHECK:       ## %bb.0: ## %entry24; CHECK-NEXT:    vbroadcastsd (%rdi), %ymm025; CHECK-NEXT:    retq26entry:27  %0 = tail call <4 x double> @llvm.x86.avx.vbroadcast.sd.256(ptr %__a)28  ret <4 x double> %029}30declare <4 x double> @llvm.x86.avx.vbroadcast.sd.256(ptr)31 32define <8 x float> @test_mm256_broadcast_ss(ptr readonly %__a) {33; CHECK-LABEL: test_mm256_broadcast_ss:34; CHECK:       ## %bb.0: ## %entry35; CHECK-NEXT:    vbroadcastss (%rdi), %ymm036; CHECK-NEXT:    retq37entry:38  %0 = tail call <8 x float> @llvm.x86.avx.vbroadcast.ss.256(ptr %__a)39  ret <8 x float> %040}41declare <4 x float> @llvm.x86.avx.vbroadcast.ss(ptr)42