<p dir="ltr">PointerType::getElementType should give you the vector type, which should have the size and element type</p>
<div class="gmail_quote">On Feb 25, 2016 5:03 AM, "Simona Simona via cfe-users" <<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div><div><div>Hello,<br><br></div>I'm using LLVM 3.4 and have the following IR instruction:<br>           %tmp1 = load <b><2 x float>*</b> %tmp, align 1, !dbg !26<br><br></div>The operand 0 of the load instruction is of type PointerType. I've checked this using: I.getOperand(0)->getType()->isPointerTy().<br></div><div>I would appreciate if someone could tell me how I could extract from this PointerType operand the vector size (2) and the scalar type (float).<br><br></div><div>Many thanks,<br></div><div>Simona<br></div><div><br></div> <br></div>
<br>_______________________________________________<br>
cfe-users mailing list<br>
<a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a><br>
<a href="http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users" rel="noreferrer" target="_blank">http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-users</a><br>
<br></blockquote></div>