1*9880d681SAndroid Build Coastguard Worker; NOTE: Assertions have been autogenerated by utils/update_llc_test_checks.py 2*9880d681SAndroid Build Coastguard Worker; RUN: llc < %s -mtriple=x86_64-apple-macosx10.9.0 -mattr=+avx | FileCheck %s 3*9880d681SAndroid Build Coastguard Worker 4*9880d681SAndroid Build Coastguard Worker; Check that we properly upgrade the AVX vbroadcast intrinsics to IR. The 5*9880d681SAndroid Build Coastguard Worker; expectation is that we should still get the original instruction back that 6*9880d681SAndroid Build Coastguard Worker; maps to the intrinsic. 7*9880d681SAndroid Build Coastguard Worker 8*9880d681SAndroid Build Coastguard Workertarget datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128" 9*9880d681SAndroid Build Coastguard Worker 10*9880d681SAndroid Build Coastguard Workerdefine <4 x float> @test_mm_broadcast_ss(float* readonly %__a){ 11*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_mm_broadcast_ss: 12*9880d681SAndroid Build Coastguard Worker; CHECK: ## BB#0: ## %entry 13*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: vbroadcastss (%rdi), %xmm0 14*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: retq 15*9880d681SAndroid Build Coastguard Workerentry: 16*9880d681SAndroid Build Coastguard Worker %0 = bitcast float* %__a to i8* 17*9880d681SAndroid Build Coastguard Worker %1 = tail call <4 x float> @llvm.x86.avx.vbroadcast.ss(i8* %0) 18*9880d681SAndroid Build Coastguard Worker ret <4 x float> %1 19*9880d681SAndroid Build Coastguard Worker} 20*9880d681SAndroid Build Coastguard Workerdeclare <8 x float> @llvm.x86.avx.vbroadcast.ss.256(i8*) 21*9880d681SAndroid Build Coastguard Worker 22*9880d681SAndroid Build Coastguard Workerdefine <4 x double> @test_mm256_broadcast_sd(double* readonly %__a) { 23*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_mm256_broadcast_sd: 24*9880d681SAndroid Build Coastguard Worker; CHECK: ## BB#0: ## %entry 25*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: vbroadcastsd (%rdi), %ymm0 26*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: retq 27*9880d681SAndroid Build Coastguard Workerentry: 28*9880d681SAndroid Build Coastguard Worker %0 = bitcast double* %__a to i8* 29*9880d681SAndroid Build Coastguard Worker %1 = tail call <4 x double> @llvm.x86.avx.vbroadcast.sd.256(i8* %0) 30*9880d681SAndroid Build Coastguard Worker ret <4 x double> %1 31*9880d681SAndroid Build Coastguard Worker} 32*9880d681SAndroid Build Coastguard Workerdeclare <4 x double> @llvm.x86.avx.vbroadcast.sd.256(i8*) 33*9880d681SAndroid Build Coastguard Worker 34*9880d681SAndroid Build Coastguard Workerdefine <8 x float> @test_mm256_broadcast_ss(float* readonly %__a) { 35*9880d681SAndroid Build Coastguard Worker; CHECK-LABEL: test_mm256_broadcast_ss: 36*9880d681SAndroid Build Coastguard Worker; CHECK: ## BB#0: ## %entry 37*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: vbroadcastss (%rdi), %ymm0 38*9880d681SAndroid Build Coastguard Worker; CHECK-NEXT: retq 39*9880d681SAndroid Build Coastguard Workerentry: 40*9880d681SAndroid Build Coastguard Worker %0 = bitcast float* %__a to i8* 41*9880d681SAndroid Build Coastguard Worker %1 = tail call <8 x float> @llvm.x86.avx.vbroadcast.ss.256(i8* %0) 42*9880d681SAndroid Build Coastguard Worker ret <8 x float> %1 43*9880d681SAndroid Build Coastguard Worker} 44*9880d681SAndroid Build Coastguard Workerdeclare <4 x float> @llvm.x86.avx.vbroadcast.ss(i8*) 45