added broadcast

This commit is contained in:
Evghenii
2014-01-22 20:46:41 +01:00
parent 7d0aa7a336
commit 11964a8ce8
2 changed files with 16 additions and 7 deletions

View File

@@ -1125,6 +1125,22 @@ rotate(i64)
rotate(float)
rotate(double)
define(`broadcast', `
define <1 x $1> @__broadcast_$1(<1 x $1>, i32) nounwind readnone alwaysinline
{
%val = extractelement <1 x $1> %0, i32 0
%rets = tail call $1 @__shfl_$1_nvptx($1 %val, i32 %1)
%retv = insertelement <1 x $1> undef, $1 %rets, i32 0
ret <1 x $1> %retv
}
')
broadcast(i8)
broadcast(i16)
broadcast(i32)
broadcast(i64)
broadcast(float)
broadcast(double)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; unaligned loads/loads+broadcasts