<div dir="ltr">Is it possible to load a value into a vector register and broadcast it in LLVM?<div><br></div><div>For example, for the following address %x</div><div><br></div><div><div> %x = getelementptr inbounds %struct._Ray* %ray, i32 0, i32 0, i32 0</div></div><div><br></div><div>instead of loading the value at %x into a scalar register %0:</div><div>%0 = load double* %x, align 4, !tbaa !0<br></div><div><br></div><div>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.</div><div><br></div><div>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. </div><div><br></div><div>Any help would be appreciated.</div><div><br></div><div>Best,</div><div>Zhi</div><div><br></div></div>