brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.2 KiB · c5912e1 Raw
36 lines · plain
1; RUN: llc < %s | FileCheck %s2target triple = "armv6kz-unknown-unknown-gnueabihf"3 4; Make sure this doesn't crash, and we actually emit a tail call.5; Unfortunately, this test is sort of fragile... the original issue only6; shows up if scheduling happens in a very specific order. But including7; it anyway just to demonstrate the issue.8; CHECK: pop {r{{[0-9]+}}, lr}9 10@e = external local_unnamed_addr constant [0 x ptr], align 411 12; Function Attrs: nounwind sspstrong13define i32 @AVI_ChunkRead_p_chk(i32 %g) nounwind sspstrong "target-cpu"="arm1176jzf-s" {14entry:15  %b = alloca i8, align 116  %tobool = icmp eq i32 %g, 017  br i1 %tobool, label %if.end, label %if.then18 19if.then:                                          ; preds = %entry20  %add = add nsw i32 %g, 121  %arrayidx = getelementptr inbounds [0 x ptr], ptr @e, i32 0, i32 %add22  %0 = load ptr, ptr %arrayidx, align 423  %call = tail call i32 %0(i32 0, i32 0) #324  br label %return25 26if.end:                                           ; preds = %entry27  call void @c(ptr nonnull %b)28  br label %return29 30return:                                           ; preds = %if.end, %if.then31  %retval.0 = phi i32 [ %call, %if.then ], [ 0, %if.end ]32  ret i32 %retval.033}34 35declare void @c(ptr)36