[llvm-bugs] [Bug 34908] New: Assertion tripped in GVN: "Replacing constants with constants is inval"

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Oct 10 14:46:07 PDT 2017


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

            Bug ID: 34908
           Summary: Assertion tripped in GVN: "Replacing constants with
                    constants is inval"
           Product: libraries
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: Scalar Optimizations
          Assignee: unassignedbugs at nondot.org
          Reporter: alex at crichton.co
                CC: llvm-bugs at lists.llvm.org

When compiling the following IR



define i1 @foo() {
    call void @llvm.assume(i1 undef)
    ret i1 undef
}

declare void @llvm.assume(i1)




The GVN pass will crash with an assertion when assertions are enabled

$ opt -S foo.ll -gvn
opt: /home/alex/code/rust2/src/llvm/lib/Transforms/Scalar/GVN.cpp:1509: bool
llvm::GVN::replaceOperandsWithConsts(llvm::Instruction*) const: Assertion
`!isa<Constant>(Operand) && "Replacing constants with constants is invalid"'
failed.

-- 
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/20171010/1cd578e4/attachment.html>


More information about the llvm-bugs mailing list