mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-10-09 03:55:34 +00:00
531f19f767
avoid returning early for v8i32 types, which would only be valid for vector with all zeros. Also split the handling of zeros and ones into separate checking logic since they are handled differently. This fixes PR10547 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136642 91177308-0d34-0410-b5e6-96231b3b80d8
36 lines
1.2 KiB
LLVM
36 lines
1.2 KiB
LLVM
; RUN: llc < %s -mtriple=x86_64-apple-darwin -mcpu=corei7-avx -mattr=+avx | FileCheck %s
|
|
|
|
@x = common global <8 x float> zeroinitializer, align 32
|
|
@y = common global <4 x double> zeroinitializer, align 32
|
|
|
|
define void @zero() nounwind ssp {
|
|
entry:
|
|
; CHECK: vxorps
|
|
; CHECK: vmovaps
|
|
; CHECK: vmovaps
|
|
store <8 x float> zeroinitializer, <8 x float>* @x, align 32
|
|
store <4 x double> zeroinitializer, <4 x double>* @y, align 32
|
|
ret void
|
|
}
|
|
|
|
; CHECK: vpcmpeqd
|
|
; CHECK: vinsertf128 $1
|
|
define void @ones([0 x float]* nocapture %RET, [0 x float]* nocapture %aFOO) nounwind {
|
|
allocas:
|
|
%ptr2vec615 = bitcast [0 x float]* %RET to <8 x float>*
|
|
store <8 x float> <float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float
|
|
0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float
|
|
0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000, float 0xFFFFFFFFE0000000>, <8 x
|
|
float>* %ptr2vec615, align 32
|
|
ret void
|
|
}
|
|
|
|
; CHECK: vpcmpeqd
|
|
; CHECK: vinsertf128 $1
|
|
define void @ones2([0 x i32]* nocapture %RET, [0 x i32]* nocapture %aFOO) nounwind {
|
|
allocas:
|
|
%ptr2vec615 = bitcast [0 x i32]* %RET to <8 x i32>*
|
|
store <8 x i32> <i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1, i32 -1>, <8 x i32>* %ptr2vec615, align 32
|
|
ret void
|
|
}
|