brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.9 KiB · ea2fead Raw
59 lines · plain
1; RUN: llc -mtriple=hexagon -verify-machineinstrs < %s | FileCheck %s2; Check that this testcase compiles successfully.3; CHECK-LABEL: fred:4; CHECK: call foo5 6target triple = "hexagon"7 8%struct.0 = type { i32, i16, ptr }9 10declare void @llvm.lifetime.start.p0(i64, ptr nocapture) #111declare void @llvm.lifetime.end.p0(i64, ptr nocapture) #112 13define i32 @fred(ptr readonly %p0, ptr %p1) local_unnamed_addr #0 {14entry:15  %v0 = alloca i16, align 216  %v1 = icmp eq ptr %p0, null17  br i1 %v1, label %if.then, label %lor.lhs.false18 19lor.lhs.false:                                    ; preds = %entry20  %v3 = load ptr, ptr %p0, align 421  %v4 = icmp eq ptr %v3, null22  br i1 %v4, label %if.then, label %if.else23 24if.then:                                          ; preds = %lor.lhs.false, %ent25  %v5 = icmp eq ptr %p1, null26  br i1 %v5, label %cleanup, label %if.then327 28if.then3:                                         ; preds = %if.then29  store i32 0, ptr %p1, align 430  br label %cleanup31 32if.else:                                          ; preds = %lor.lhs.false33  call void @llvm.lifetime.start.p0(i64 2, ptr nonnull %v0) #034  store i16 0, ptr %v0, align 235  %v7 = call i32 @foo(ptr nonnull %v3, ptr nonnull %v0) #036  %v8 = icmp eq ptr %p1, null37  br i1 %v8, label %if.end7, label %if.then638 39if.then6:                                         ; preds = %if.else40  %v9 = load i16, ptr %v0, align 241  %v10 = zext i16 %v9 to i3242  store i32 %v10, ptr %p1, align 443  br label %if.end744 45if.end7:                                          ; preds = %if.else, %if.then646  call void @llvm.lifetime.end.p0(i64 2, ptr nonnull %v0) #047  br label %cleanup48 49cleanup:                                          ; preds = %if.then3, %if.then,50  %v11 = phi i32 [ %v7, %if.end7 ], [ -2147024809, %if.then ], [ -2147024809, %if.then3 ]51  ret i32 %v1152}53 54declare i32 @foo(ptr, ptr) local_unnamed_addr #055 56attributes #0 = { nounwind }57attributes #1 = { argmemonly nounwind }58 59