1 ;; No extension -> no LinkOnceODR
2 ; RUN: llc -O0 -mtriple=spirv32-unknown-unknown %s -o - | FileCheck %s --check-prefix=CHECK-SPIRV
4 ; CHECK-SPIRV-NOT: OpExtension "SPV_KHR_linkonce_odr"
5 ; CHECK-SPIRV-NOT: OpDecorate %[[#]] LinkageAttributes "GV" LinkOnceODR
6 ; CHECK-SPIRV-NOT: OpDecorate %[[#]] LinkageAttributes "square" LinkOnceODR
8 @GV = linkonce_odr addrspace(1) global [3 x i32] zeroinitializer, align 4
10 define spir_kernel void @k() {
12 %call = call spir_func i32 @square(i32 2)
16 define linkonce_odr dso_local spir_func i32 @square(i32 %in) {
18 %in.addr = alloca i32, align 4
19 store i32 %in, i32* %in.addr, align 4
20 %0 = load i32, i32* %in.addr, align 4
21 %1 = load i32, i32* %in.addr, align 4
22 %mul = mul nsw i32 %0, %1