blob: 6a3be7aace1350ad02fd17929c3097111e995bd8 [file] [log] [blame]
Simon Pilgrim9fb06bc2015-05-01 08:20:04 +00001; 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
6define <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}