1; RUN: llc -O3 -disable-peephole -mcpu=corei7-avx -mattr=+avx < %s | FileCheck %s 2 3target datalayout = "e-i64:64-f80:128-n8:16:32:64-S128" 4target triple = "x86_64-apple-macosx10.9.0" 5 6; Function Attrs: nounwind ssp uwtable 7define void @test1(float* %A, float* %C) #0 { 8 %tmp1 = bitcast float* %A to <8 x float>* 9 %tmp2 = load <8 x float>, <8 x float>* %tmp1, align 32 10 %tmp3 = bitcast <8 x float> %tmp2 to <8 x i32> 11 %tmp4 = and <8 x i32> %tmp3, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647> 12 %tmp5 = bitcast <8 x i32> %tmp4 to <8 x float> 13 %tmp6 = extractelement <8 x float> %tmp5, i32 0 14 store float %tmp6, float* %C 15 ret void 16 17 ; CHECK: vandps LCPI0_0(%rip), %ymm0, %ymm0 18} 19 20; Function Attrs: nounwind ssp uwtable 21define void @test2(float* %A, float* %C) #0 { 22 %tmp1 = bitcast float* %A to <8 x float>* 23 %tmp2 = load <8 x float>, <8 x float>* %tmp1, align 32 24 %tmp3 = bitcast <8 x float> %tmp2 to <8 x i32> 25 %tmp4 = or <8 x i32> %tmp3, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647> 26 %tmp5 = bitcast <8 x i32> %tmp4 to <8 x float> 27 %tmp6 = extractelement <8 x float> %tmp5, i32 0 28 store float %tmp6, float* %C 29 ret void 30 31 ; CHECK: vorps LCPI1_0(%rip), %ymm0, %ymm0 32} 33 34; Function Attrs: nounwind ssp uwtable 35define void @test3(float* %A, float* %C) #0 { 36 %tmp1 = bitcast float* %A to <8 x float>* 37 %tmp2 = load <8 x float>, <8 x float>* %tmp1, align 32 38 %tmp3 = bitcast <8 x float> %tmp2 to <8 x i32> 39 %tmp4 = xor <8 x i32> %tmp3, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647> 40 %tmp5 = bitcast <8 x i32> %tmp4 to <8 x float> 41 %tmp6 = extractelement <8 x float> %tmp5, i32 0 42 store float %tmp6, float* %C 43 ret void 44 45 ; CHECK: vxorps LCPI2_0(%rip), %ymm0, %ymm0 46} 47 48define void @test4(float* %A, float* %C) #0 { 49 %tmp1 = bitcast float* %A to <8 x float>* 50 %tmp2 = load <8 x float>, <8 x float>* %tmp1, align 32 51 %tmp3 = bitcast <8 x float> %tmp2 to <8 x i32> 52 %tmp4 = xor <8 x i32> %tmp3, <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1> 53 %tmp5 = and <8 x i32> %tmp4, <i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647, i32 2147483647> 54 %tmp6 = bitcast <8 x i32> %tmp5 to <8 x float> 55 %tmp7 = extractelement <8 x float> %tmp6, i32 0 56 store float %tmp7, float * %C 57 ret void 58 59 ;CHECK: vandnps LCPI3_0(%rip), %ymm0, %ymm0 60} 61