[llvm-bugs] [Bug 34421] New: Crash in SelectionDAG LegalizeOp - Unexpected illegal type! (llvm/trunk 312389)

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Sep 1 19:05:22 PDT 2017


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

            Bug ID: 34421
           Summary: Crash in SelectionDAG LegalizeOp - Unexpected illegal
                    type! (llvm/trunk 312389)
           Product: new-bugs
           Version: trunk
          Hardware: PC
                OS: All
            Status: NEW
          Severity: normal
          Priority: P
         Component: new bugs
          Assignee: unassignedbugs at nondot.org
          Reporter: vsk at apple.com
                CC: llvm-bugs at lists.llvm.org

Created attachment 19077
  --> https://bugs.llvm.org/attachment.cgi?id=19077&action=edit
Reduced test case (bitcode, just pass to llc)

I see an assertion failure after running llc on a test.

This is the failure:

Assertion failed: ((TLI.getTypeAction(*DAG.getContext(), Node->getValueType(i))
== TargetLowering::TypeLegal || TLI.isTypeLegal(Node->getValueType(i))) &&
"Unexpected illegal type!"), function LegalizeOp, file
/Users/vk/src/llvm.org-ubsan-feopt/llvm/lib/CodeGen/SelectionDAG/LegalizeDAG.cpp,
line 944.
6  libLLVMSelectionDAG.dylib 0x0000000106e367a0 (anonymous
namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) + 10848
7  libLLVMSelectionDAG.dylib 0x0000000106e36ffb
llvm::SelectionDAG::LegalizeOp(llvm::SDNode*,
llvm::SmallSetVector<llvm::SDNode*, 16u>&) + 123
8  libLLVMSelectionDAG.dylib 0x0000000106d9786d
llvm::SelectionDAG::Combine(llvm::CombineLevel, llvm::AAResults*,
llvm::CodeGenOpt::Level) + 1325
9  libLLVMSelectionDAG.dylib 0x0000000106f8e878
llvm::SelectionDAGISel::CodeGenAndEmitDAG() + 5112
10 libLLVMSelectionDAG.dylib 0x0000000106f8c180
llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) + 9504
11 libLLVMSelectionDAG.dylib 0x0000000106f88a76
llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 2070
12 libLLVMX86CodeGen.dylib   0x0000000105722024 (anonymous
namespace)::X86DAGToDAGISel::runOnMachineFunction(llvm::MachineFunction&) + 20

Here is a reduced test (I've attached the bitcode as
bugpoint-reducued-simplified.bc):

source_filename = "bugpoint-output-c1714d5.bc"
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"
target triple = "x86_64-apple-macosx10.13.0"

; Function Attrs: noimplicitfloat noredzone nounwind
define void @thread_selfcounts() local_unnamed_addr #0 {
entry:
  %counts = alloca [2 x i64], align 16
  %thread_counts = alloca [3 x i64], align 16
  %arraydecay = getelementptr inbounds [3 x i64], [3 x i64]* %thread_counts,
i64 0, i64 0
  %0 = load i64, i64* %arraydecay, align 16, !tbaa !1
  %arrayidx3 = getelementptr inbounds [2 x i64], [2 x i64]* %counts, i64 0, i64
0
  store i64 %0, i64* %arrayidx3, align 16, !tbaa !1
  %arrayidx6 = getelementptr inbounds [3 x i64], [3 x i64]* %thread_counts, i64
0, i64 1
  %1 = load i64, i64* %arrayidx6, align 8, !tbaa !1
  %arrayidx10 = getelementptr inbounds [2 x i64], [2 x i64]* %counts, i64 0,
i64 1
  store i64 %1, i64* %arrayidx10, align 8, !tbaa !1
  unreachable
}

attributes #0 = { noimplicitfloat noredzone nounwind
"correctly-rounded-divide-sqrt-fp-math"="false" "disable-tail-calls"="false"
"less-precise-fpmad"="false" "no-frame-pointer-elim"="true"
"no-frame-pointer-elim-non-leaf" "no-infs-fp-math"="false"
"no-jump-tables"="false" "no-nans-fp-math"="false"
"no-signed-zeros-fp-math"="false" "no-trapping-math"="false"
"stack-protector-buffer-size"="8" "target-cpu"="penryn"
"target-features"="+cx16,+fxsr,+mmx,+sse,+sse2,+sse3,+sse4.1,+ssse3,+x87"
"unsafe-fp-math"="false" "use-soft-float"="false" }

!llvm.ident = !{!0}

!0 = !{!"clang version 6.0.0 (trunk 312392) (llvm/trunk 312389)"}
!1 = !{!2, !2, i64 0}
!2 = !{!"long long", !3, i64 0}
!3 = !{!"omnipotent char", !4, i64 0}
!4 = !{!"Simple C/C++ TBAA"}

-- 
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/20170902/eacba585/attachment.html>


More information about the llvm-bugs mailing list