http://llvm.org/bugs/show_bug.cgi?id=22180

            Bug ID: 22180
           Summary: TypeBasedAliasAnalysis::PathAliases crashes  when
                    processing 'distinct' MDNode
           Product: tools
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: llc
          Assignee: [email protected]
          Reporter: [email protected]
                CC: [email protected]
    Classification: Unclassified

Created attachment 13659
  --> http://llvm.org/bugs/attachment.cgi?id=13659&action=edit
reduced test case

Find attached a bugpoint reduced test case for the issue.

TypeBasedAliasAnalysis::PathAliases at line 409 assumes the MD node has offset
fields which are constants, so it crashes when it processes a node like !9:

!9 = distinct !{!9, !10, !11}
!10 = !{!"llvm.loop.vectorize.width", i32 1}
!11 = !{!"llvm.loop.interleave.count", i32 1}


How to reproduce:
llc -O3 test.ll

llc: ../include/llvm/Support/Casting.h:223: typename std::enable_if<(!
llvm::is_simple_type<Y>::value), typename llvm::cast_retty<X, const
Y>::ret_type>::type llvm::cast(const Y&) [with X = llvm::ConstantAsMetadata; Y
= llvm::MDOperand; typename std::enable_if<(! llvm::is_simple_type<Y>::value),
typename llvm::cast_retty<X, const Y>::ret_type>::type =
llvm::ConstantAsMetadata*]: Assertion `isa<X>(Val) && "cast<Ty>() argument of
incompatible type!"' failed.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
LLVMbugs mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/llvmbugs

Reply via email to