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: unassignedb...@nondot.org
          Reporter: a...@crichton.co
                CC: llvm-bugs@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.
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs

Reply via email to