brintos

brintos / llvm-project-archived public Read only

0
0
Text · 1.6 KiB · b5b7fbe Raw
60 lines · plain
1; RUN: llc -mtriple=hexagon < %s | FileCheck %s2 3; Test that the first packet contains 4 instructions, which includes4; a call. The compiler marked the call as constant extended incorrectly,5; which meant it couldn't fit in the first packet. But, calls are not6; constant extended by the compiler.7 8; CHECK: {9; CHECK-NEXT: call f110; CHECK-NEXT: combine11; CHECK-NEXT: memd12; CHECK-NEXT: allocframe13; CHECK-NEXT: }14 15 16@g0 = external global i3217 18; Function Attrs: noinline nounwind19define i32 @f0(i32 %a0, ptr nocapture %a1) #0 {20b0:21  %v0 = tail call i32 @f1(i32 %a0)22  %v1 = icmp eq i32 %v0, 023  %v2 = select i1 %v1, i32 3, i32 %a024  store i32 %v2, ptr %a1, align 425  switch i32 %a0, label %b5 [26    i32 0, label %b127    i32 1, label %b228    i32 2, label %b329    i32 4, label %b430  ]31 32b1:                                               ; preds = %b033  store i32 0, ptr %a1, align 434  br label %b535 36b2:                                               ; preds = %b037  %v3 = load i32, ptr @g0, align 438  %v4 = icmp sgt i32 %v3, 10039  %v5 = select i1 %v4, i32 0, i32 340  store i32 %v5, ptr %a1, align 441  br label %b542 43b3:                                               ; preds = %b044  store i32 1, ptr %a1, align 445  br label %b546 47b4:                                               ; preds = %b048  store i32 2, ptr %a1, align 449  br label %b550 51b5:                                               ; preds = %b4, %b3, %b2, %b1, %b052  ret i32 undef53}54 55; Function Attrs: noinline nounwind readnone56declare i32 @f1(i32) #157 58attributes #0 = { noinline nounwind "target-cpu"="hexagonv60" }59attributes #1 = { noinline nounwind readnone "target-cpu"="hexagonv60" }60