Home | History | Annotate | Download | only in Hexagon
      1 ; RUN: llc -march=hexagon < %s | FileCheck %s
      2 
      3 ; Look for only one declaration of the const struct.
      4 ; CHECK: g0:
      5 ; CHECK-NOT: g02:
      6 
      7 target triple = "hexagon"
      8 
      9 %s.8 = type { %s.9, i8*, i8* }
     10 %s.9 = type { i16, i16, i32 }
     11 %s.0 = type { i32, %s.1*, %s.1*, i32, i32, i32, i32, i32, {}*, void (i8*)*, void (i8*)*, i8*, [32 x %s.4], i32, i16, i16, i16, i16, [16 x %s.7], i16 }
     12 %s.1 = type { i16, i8, i8, i32, %s.2 }
     13 %s.2 = type { %s.3, i8* }
     14 %s.3 = type { i8* }
     15 %s.4 = type { %s.5*, %s.5*, i16, i32 }
     16 %s.5 = type { %s.6, %s.5* }
     17 %s.6 = type { i16, i8, i8, i32 }
     18 %s.7 = type { %s.1*, i32 }
     19 %s.11 = type { i32, %s.12* }
     20 %s.12 = type opaque
     21 
     22 @g0 = internal constant %s.8 { %s.9 { i16 531, i16 0, i32 16 }, i8* getelementptr inbounds ([48 x i8], [48 x i8]* @g1, i32 0, i32 0), i8* getelementptr inbounds ([10 x i8], [10 x i8]* @g2, i32 0, i32 0) }, align 4
     23 @g1 = private unnamed_addr constant [48 x i8] c"In task 0x%x, Assertion heap_ptr != NULL failed\00", align 8
     24 @g2 = private unnamed_addr constant [10 x i8] c"xxxxxxx.c\00", align 8
     25 
     26 ; Function Attrs: nounwind
     27 define void @f0(%s.0* %a0) #0 {
     28 b0:
     29   %v0 = icmp eq %s.0* %a0, null
     30   br i1 %v0, label %b1, label %b4
     31 
     32 b1:                                               ; preds = %b0
     33   %v1 = tail call %s.11* @f1() #0
     34   %v2 = icmp eq %s.11* %v1, null
     35   br i1 %v2, label %b3, label %b2
     36 
     37 b2:                                               ; preds = %b1
     38   %v3 = ptrtoint %s.11* %v1 to i32
     39   tail call void @f2(%s.8* @g0, i32 %v3, i32 0, i32 0) #0
     40   br label %b5
     41 
     42 b3:                                               ; preds = %b1
     43   tail call void @f3(%s.8* @g0) #0
     44   br label %b5
     45 
     46 b4:                                               ; preds = %b0
     47   %v4 = getelementptr inbounds %s.0, %s.0* %a0, i32 0, i32 9
     48   store void (i8*)* @f4, void (i8*)** %v4, align 4, !tbaa !0
     49   %v5 = getelementptr inbounds %s.0, %s.0* %a0, i32 0, i32 10
     50   store void (i8*)* @f5, void (i8*)** %v5, align 4, !tbaa !0
     51   br label %b5
     52 
     53 b5:                                               ; preds = %b4, %b3, %b2
     54   ret void
     55 }
     56 
     57 declare %s.11* @f1()
     58 
     59 declare void @f2(%s.8*, i32, i32, i32)
     60 
     61 declare void @f3(%s.8*)
     62 
     63 declare void @f4(i8*)
     64 
     65 declare void @f5(i8*)
     66 
     67 attributes #0 = { nounwind }
     68 
     69 !0 = !{!1, !1, i64 0}
     70 !1 = !{!"any pointer", !2}
     71 !2 = !{!"omnipotent char", !3}
     72 !3 = !{!"Simple C/C++ TBAA"}
     73