<html>
    <head>
      <base href="https://llvm.org/bugs/" />
    </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 --- - "two address instruction invalid" assertion in TwoAddressInstructionPass"
   href="https://llvm.org/bugs/show_bug.cgi?id=23578">23578</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>"two address instruction invalid" assertion in TwoAddressInstructionPass
          </td>
        </tr>

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

        <tr>
          <th>Version</th>
          <td>3.5
          </td>
        </tr>

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

        <tr>
          <th>OS</th>
          <td>Linux
          </td>
        </tr>

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

        <tr>
          <th>Severity</th>
          <td>normal
          </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>gm4cheng@gmail.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>Here is a simple llvm ir at the end.  When I ran "lli -O0" on it, I got:

lli: .../TwoAddressInstructionPass.cpp:1314: bool
{anonymous}::TwoAddressInstructionPass::collectTiedOperands(llvm::MachineInstr*,
{anonymous}::TwoAddressInstructionPass::TiedOperandMap&): Assertion `SrcReg &&
SrcMO.isUse() && "two address instruction invalid"' failed.


---- <begin> ----
; ModuleID = 'module_name'

%0 = type <{ double*, i1* }>

define void @main(double*, %0* %t0) {
entry:
  br label %1

; <label>:1                                       ; preds = %entry
  %2 = getelementptr inbounds %0* %t0, i64 0, i32 1
  %3 = load i1** %2, align 8
  %4 = load i1* %3, align 1
  %5 = getelementptr inbounds %0* %t0, i64 0, i32 0
  %6 = load double** %5, align 8
  %7 = load double* %6, align 8
  %8 = fcmp ogt double %7, -1.000000e-01
  %9 = select i1 %8, double 1.000000e+00, double 0.000000e+00
  %10 = select i1 %4, double %9, double 1.000000e+00
  store double %10, double* %0, align 8
  ret void
}

---- <end> ----</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>