[llvm-bugs] [Bug 36134] New: opt crashes with -aggressive-instcombine: ../lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp:296: llvm::Value *llvm::TruncInstCombine::getReducedOperand(llvm::Value *, llvm::Type *): Assertion `Entry.NewValue' failed.

via llvm-bugs llvm-bugs at lists.llvm.org
Mon Jan 29 05:29:10 PST 2018


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

            Bug ID: 36134
           Summary: opt crashes with -aggressive-instcombine:
                    ../lib/Transforms/AggressiveInstCombine/TruncInstCombi
                    ne.cpp:296: llvm::Value
                    *llvm::TruncInstCombine::getReducedOperand(llvm::Value
                    *, llvm::Type *): Assertion `Entry.NewValue' failed.
           Product: new-bugs
           Version: unspecified
          Hardware: PC
                OS: Linux
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: mikael.holmen at ericsson.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19763
  --> https://bugs.llvm.org/attachment.cgi?id=19763&action=edit
reproducer

Running:
 opt -S -o - reduced.ll -aggressive-instcombine

Gives:

opt: ../lib/Transforms/AggressiveInstCombine/TruncInstCombine.cpp:296:
llvm::Value *llvm::TruncInstCombine::getReducedOperand(llvm::Value *,
llvm::Type *): Assertion `Entry.NewValue' failed.

This happens even with the patch

 https://reviews.llvm.org/D42622

applied.

The input looks like:

define void @func_20() {
for.body94:
  unreachable

for.cond641:
  %or722 = or i32 %or722, undef
  %or723 = or i32 %or722, 1
  %conv724 = trunc i32 %or723 to i16
  br label %for.cond641
}

which is kind of weird since %for.cond641 is unreachable from the entry.
This kind of code can be produced by jump-threading though.

-- 
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/20180129/dcb8a7d8/attachment.html>


More information about the llvm-bugs mailing list