1; RUN: opt %loadPolly -tbaa -polly-codegen -disable-output %s 2; 3; Check that we do not crash here. 4; 5; ModuleID = 'bugpoint-reduced-simplified.bc' 6target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128" 7 8%"DOMParentNode" = type { %"DOMNode"*, %"DOMNode"*, %"DOMNodeListImpl" } 9%"DOMDocumentRange" = type { i32 (...)** } 10%"DOMXPathEvaluator" = type { i32 (...)** } 11%"DOMDocumentTraversal" = type { i32 (...)** } 12%"DOMNode" = type { i32 (...)** } 13%"DOMNodeListImpl" = type { %"DOMNodeList", %"DOMNode"* } 14%"DOMNodeList" = type { i32 (...)** } 15%"DOMElementImpl" = type { %"DOMElement", %"DOMNodeImpl", %"DOMParentNode", %"DOMChildNode", %"DOMAttrMapImpl"*, %"DOMAttrMapImpl"*, i16* } 16%"DOMElement" = type { %"DOMNode" } 17%"DOMNodeImpl" = type <{ %"DOMNode"*, i16, [6 x i8] }> 18%"DOMChildNode" = type { %"DOMNode"*, %"DOMNode"* } 19%"DOMAttrMapImpl" = type <{ %"DOMNamedNodeMapImpl", i8, [7 x i8] }> 20%"DOMNamedNodeMapImpl" = type { %"DOMNamedNodeMap", %"DOMNode"* } 21%"DOMNamedNodeMap" = type { i32 (...)** } 22%"DOMTextImpl" = type { %"DOMText", %"DOMNodeImpl", %"DOMChildNode" } 23%"DOMText" = type { %"DOMCharacterData" } 24%"DOMCharacterData" = type { %"DOMNode" } 25 26; Function Attrs: uwtable 27define void @_ZN11xercesc_2_513DOMParentNode9lastChildEPNS_7DOMNodeE(%"DOMParentNode"* %this, %"DOMNode"* %node) #0 align 2 { 28entry: 29 br label %entry.split 30 31entry.split: ; preds = %entry 32 %fFirstChild = getelementptr inbounds %"DOMParentNode", %"DOMParentNode"* %this, i32 0, i32 1 33 %0 = load %"DOMNode"*, %"DOMNode"** %fFirstChild, align 8, !tbaa !1 34 %cmp = icmp ne %"DOMNode"* %0, null 35 br i1 %cmp, label %if.then, label %if.end 36 37if.then: ; preds = %entry.split 38 %1 = bitcast %"DOMNode"* %0 to %"DOMElementImpl"* 39 %fNode.i = getelementptr inbounds %"DOMElementImpl", %"DOMElementImpl"* %1, i32 0, i32 1 40 %flags.i.i = getelementptr inbounds %"DOMNodeImpl", %"DOMNodeImpl"* %fNode.i, i32 0, i32 1 41 %2 = load i16, i16* %flags.i.i, align 8, !tbaa !7 42 %3 = bitcast %"DOMNode"* %0 to %"DOMTextImpl"* 43 %fChild.i = getelementptr inbounds %"DOMTextImpl", %"DOMTextImpl"* %3, i32 0, i32 2 44 %fChild1.i = getelementptr inbounds %"DOMElementImpl", %"DOMElementImpl"* %1, i32 0, i32 3 45 %retval.0.i = select i1 undef, %"DOMChildNode"* %fChild.i, %"DOMChildNode"* %fChild1.i 46 %previousSibling = getelementptr inbounds %"DOMChildNode", %"DOMChildNode"* %retval.0.i, i32 0, i32 0 47 store %"DOMNode"* %node, %"DOMNode"** %previousSibling, align 8, !tbaa !10 48 br label %if.end 49 50if.end: ; preds = %if.then, %entry.split 51 ret void 52} 53 54!0 = !{!"clang version 3.9.0"} 55!1 = !{!2, !3, i64 8} 56!2 = !{!"_ZTSN11xercesc_2_513DOMParentNodeE", !3, i64 0, !3, i64 8, !6, i64 16} 57!3 = !{!"any pointer", !4, i64 0} 58!4 = !{!"omnipotent char", !5, i64 0} 59!5 = !{!"Simple C++ TBAA"} 60!6 = !{!"_ZTSN11xercesc_2_515DOMNodeListImplE", !3, i64 8} 61!7 = !{!8, !9, i64 8} 62!8 = !{!"_ZTSN11xercesc_2_511DOMNodeImplE", !3, i64 0, !9, i64 8} 63!9 = !{!"short", !4, i64 0} 64!10 = !{!11, !3, i64 0} 65!11 = !{!"_ZTSN11xercesc_2_512DOMChildNodeE", !3, i64 0, !3, i64 8} 66