<html>
    <head>
      <base href="https://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - [inline asm] dot operator while using imm generates wrong ir + asm"
   href="https://bugs.llvm.org/show_bug.cgi?id=32987">32987</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[inline asm] dot operator while using imm generates wrong ir + asm
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>new-bugs
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>All
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>new bugs
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>ziv.izhar@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>When using both imm and dot operator in an inline asm operand the generated ir
and asm are wrong.
Consider the code:

typedef struct foo {
   int x;
   int y;
} foo;
int main(){
  __asm {mov eax, 3[rbx]foo.y}
  return 0;
}

compiling with clang -cc1 -fasm-blocks -emit-llvm gives us:
call i32 asm sideeffect inteldialect "mov eax, $$3[ebx].11",
"={eax},~{eax},~{dirflag},~{fpsr},~{flags}"

the foo.y was rewrited as .11 (8+3 instead of 8) while the immediate is still
in the ir - $$3.

when compiling to asm, it's being resolved as 11+3 = 14, instead of 8+3=11.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>