<div dir="ltr"><div><div><div>Hello,<br><br></div>I'd appreciate it if someone could give me some hints on my questions below.<br><br></div>Many thanks,<br></div>Simona<br><br><div><div><div><div><div><div class="gmail_quote">---------- Forwarded message ----------<br>From: <b class="gmail_sendername">Simona Simona</b> <span dir="ltr"><<a href="mailto:other.dev.simona@gmail.com">other.dev.simona@gmail.com</a>></span><br>Date: Mon, Feb 29, 2016 at 11:09 AM<br>Subject: Binary instruction operand type - Fast-math-flags - Vectorized IR code<br>To: <a href="mailto:cfe-users@lists.llvm.org">cfe-users@lists.llvm.org</a><br><br><br><div dir="ltr"><div><span style="font-family:arial,helvetica,sans-serif"><font size="2">Hello,<br><br>I'm using LLVM 3.4 and noticed that some of the IR binary instructions have the following format:</font></span><br><font size="2">           </font> <result> = frem [fast-math flags]* <ty> <op1>, <op2>   ; yields ty:result<br><br>I'm mainly interested in extracting the type of the operands, regardless of whether the fast-math-flags are set or not. <br></div>In the case above, that would be floating-point or vector.<br><div><pre><span style="font-family:arial,helvetica,sans-serif"><font size="2">Q1. I was just wondering if doing </font></span><span style="font-family:arial,helvetica,sans-serif"><font size="2">I.getOperand(0)->getType() would be sufficient to extract the operands type.<br>I've tried it and I get a TokenTyID for a float operand. <br><br>Q2. Moreover, how can one extract the fast-math-flags?<br></font></span></pre><pre><span style="font-family:arial,helvetica,sans-serif"><font size="2">Q3. I'd also appreciate it if someone could tell me what C/C++ source code should I use to generate IR code that <br>includes some binary operation(s) with vector operands.<br></font></span></pre><pre><span style="font-family:arial,helvetica,sans-serif"><font size="2">Many thanks,<br>Simona<br></font></span></pre><pre><br></pre></div></div></div></div></div></div></div></div></div>