[LLVMdev] Load value and broadcast in LLVM
zhi chen
zchenhn at gmail.com
Mon May 4 00:58:43 PDT 2015
Is it possible to load a value into a vector register and broadcast it in
LLVM?
For example, for the following address %x
%x = getelementptr inbounds %struct._Ray* %ray, i32 0, i32 0, i32 0
instead of loading the value at %x into a scalar register %0:
%0 = load double* %x, align 4, !tbaa !0
I want to load it into a <2 x double> vector register %1 and make both of
the two elements in %1 be the value at %x.
I guess one way to do this is to make getelementptr return a <2 x i32>*
address, where the two addresses in <2 X 32> are the same. But I don't know
if it is possible to do this in LLVM.
Any help would be appreciated.
Best,
Zhi
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20150504/395c0786/attachment.html>
More information about the llvm-dev
mailing list