[X86] Update test/CodeGen/X86/avg.ll with the help of update_llc_test_checks.py....
[oota-llvm.git] / test / CodeGen / X86 / fold-vector-trunc-sitofp.ll
1 ; RUN: llc < %s -mtriple=i686-unknown -mattr=+avx | FileCheck %s
2 ; RUN: llc < %s -mtriple=x86_64-unknown -mattr=+avx | FileCheck %s
3
4 ; Check that constant integers are correctly being truncated before float conversion
5
6 define <4 x float> @test1() {
7 ; CHECK-LABEL: test1
8 ; CHECK: movaps {{.*#+}} xmm0 = [-1.000000e+00,0.000000e+00,-1.000000e+00,0.000000e+00]
9 ; CHECK-NEXT: ret
10   %1 = trunc <4 x i3> <i3 -1, i3 -22, i3 7, i3 8> to <4 x i1>
11   %2 = sitofp <4 x i1> %1 to <4 x float>
12   ret <4 x float> %2
13 }