brintos

brintos / llvm-project-archived public Read only

0
0
Text · 869 B · 8d9bca1 Raw
30 lines · plain
1; Test that -inline-threshold overrides thresholds derived from opt levels.2; RUN: opt < %s -O2 -inline-threshold=500 -S  | FileCheck %s3; RUN: opt < %s -O3 -inline-threshold=500 -S  | FileCheck %s4; RUN: opt < %s -Os -inline-threshold=500 -S  | FileCheck %s5; RUN: opt < %s -Oz -inline-threshold=500 -S  | FileCheck %s6 7@a = global i32 48 9define i32 @simpleFunction(i32 %a) #0 {10entry:11  %a1 = load volatile i32, ptr @a12  %x1 = add i32 %a1,  %a13  ret i32 %x114}15 16; Function Attrs: nounwind readnone uwtable17define i32 @bar(i32 %a) #0 {18; CHECK-LABEL: @bar19; CHECK: load volatile20; CHECK-NEXT: add i3221; CHECK-NEXT: call i32 @simpleFunction22; CHECK: ret23entry:24  %i = tail call i32 @simpleFunction(i32 6) "function-inline-cost"="749"25  %j = tail call i32 @simpleFunction(i32 %i) "function-inline-cost"="750"26  ret i32 %j27}28 29attributes #0 = { nounwind readnone uwtable }30