| ; Test that -inline-threshold overrides thresholds derived from opt levels. |
| ; RUN: opt < %s -O2 -inline-threshold=500 -S | FileCheck %s |
| ; RUN: opt < %s -O3 -inline-threshold=500 -S | FileCheck %s |
| ; RUN: opt < %s -Os -inline-threshold=500 -S | FileCheck %s |
| ; RUN: opt < %s -Oz -inline-threshold=500 -S | FileCheck %s |
| define i32 @simpleFunction(i32 %a) #0 { |
| %a1 = load volatile i32, ptr @a |
| ; Function Attrs: nounwind readnone uwtable |
| define i32 @bar(i32 %a) #0 { |
| ; CHECK-NEXT: call i32 @simpleFunction |
| %i = tail call i32 @simpleFunction(i32 6) "function-inline-cost"="749" |
| %j = tail call i32 @simpleFunction(i32 %i) "function-inline-cost"="750" |
| attributes #0 = { nounwind readnone uwtable } |