brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.1 KiB · d8915e7 Raw
38 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2; CHECK: mpyi3; CHECK-NOT: mpyi4; The mpyis from the two GEPs should be commoned out.5 6target datalayout = "e-m:e-p:32:32-i64:64-a:0-v32:32-n16:32"7target triple = "hexagon-unknown--elf"8 9%struct.s_t = type { %struct.anon, i32 }10%struct.anon = type { i32, [5 x i32] }11 12@g = common global [100 x %struct.s_t] zeroinitializer, align 813 14; Function Attrs: nounwind15define void @foo(i32 %x) #0 {16entry:17  %cmp = icmp slt i32 %x, 9018  br i1 %cmp, label %if.then, label %if.else19 20if.then:                                          ; preds = %entry21  %arrayidx1 = getelementptr inbounds [100 x %struct.s_t], ptr @g, i32 0, i32 %x, i32 0, i32 1, i32 222  tail call void @bar(ptr %arrayidx1) #023  br label %if.end24 25if.else:                                          ; preds = %entry26  %arrayidx5 = getelementptr inbounds [100 x %struct.s_t], ptr @g, i32 0, i32 %x, i32 0, i32 1, i32 327  tail call void @bar(ptr %arrayidx5) #028  br label %if.end29 30if.end:                                           ; preds = %if.else, %if.then31  ret void32}33 34declare void @bar(ptr) #035 36attributes #0 = { nounwind }37 38