21 lines · plain
1target datalayout = "e-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024-n8:16:32:64-G1"2target triple = "spirv64"3 4define spir_func i32 @foo_func1(i32 %a, i32 %b) {5entry:6 %call = tail call spir_func i32 @addFive(i32 %b)7 %res = tail call spir_func i32 @bar_func1(i32 %a, i32 %call)8 ret i32 %res9}10 11declare spir_func i32 @bar_func1(i32, i32)12 13declare spir_func i32 @addFive(i32)14 15define spir_func i32 @foo_func2(i32 %c, i32 %d, i32 %e) {16entry:17 %call = tail call spir_func i32 @foo_func1(i32 %c, i32 %d)18 %res = mul nsw i32 %call, %e19 ret i32 %res20}21