[LLVMbugs] [Bug 23578] New: "two address instruction invalid" assertion in TwoAddressInstructionPass

bugzilla-daemon at llvm.org bugzilla-daemon at llvm.org
Tue May 19 11:31:29 PDT 2015


https://llvm.org/bugs/show_bug.cgi?id=23578

            Bug ID: 23578
           Summary: "two address instruction invalid" assertion in
                    TwoAddressInstructionPass
           Product: new-bugs
           Version: 3.5
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: gm4cheng at gmail.com
                CC: llvmbugs at cs.uiuc.edu
    Classification: Unclassified

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

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150519/a60d83bc/attachment.html>


More information about the llvm-bugs mailing list