Skip to content

Commit e73d07f

Browse files
svenvhKornevNikita
authored andcommitted
Run llvm-as and llvm-dis with -opaque-pointers=0
Update some of the tests that started failing after llvm-project commit e45cf47 ("[Bitcode] Remove auto-detection for typed pointers", 2022-12-14). This commit only updates tests that pass again after mechanically adding `-opaque-pointers=0` to their `llvm-as` and `llvm-dis` commands. Many more tests are still failing due to the opaque-pointer auto-upgrade happening when llvm-spirv reads the LLVM IR. Original commit: KhronosGroup/SPIRV-LLVM-Translator@d6c1f36
1 parent 97347d7 commit e73d07f

33 files changed

+78
-78
lines changed

llvm-spirv/test/GroupAndSubgroupInstructions.spvasm

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@
3434
; RUN: spirv-as < %s --target-env spv1.0 -o %t.spv
3535
; RUN: spirv-val %t.spv
3636
; RUN: llvm-spirv -r %t.spv --spirv-target-env=CL1.2 -o %t.bc
37-
; RUN: llvm-dis %t.bc -o %t.ll
37+
; RUN: llvm-dis -opaque-pointers=0 %t.bc -o %t.ll
3838
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-CL,CHECK-CL12
3939

4040
; RUN: llvm-spirv -r %t.spv --spirv-target-env=CL2.0 -o %t.bc
41-
; RUN: llvm-dis %t.bc -o %t.ll
41+
; RUN: llvm-dis -opaque-pointers=0 %t.bc -o %t.ll
4242
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-CL,CHECK-CL20
4343

4444
; RUN: llvm-spirv -r %t.spv --spirv-target-env=SPV-IR -o %t.bc
45-
; RUN: llvm-dis %t.bc -o %t.ll
45+
; RUN: llvm-dis -opaque-pointers=0 %t.bc -o %t.ll
4646
; RUN: FileCheck < %t.ll %s --check-prefixes=CHECK-COMMON,CHECK-SPV-IR
4747

4848
; RUN: llvm-spirv %t.bc --spirv-ext=+all -o %t.rev.spv

llvm-spirv/test/OpenCL.std/printf.spvasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc
5-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
66
; RUN: llvm-spirv %t.rev.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPV-BACK
7-
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
7+
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis -opaque-pointers=0 | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
88

99
; CHECK-LABEL: spir_kernel void @test
1010

llvm-spirv/test/OpenCL.std/vstore_half.spvasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc
5-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
66
; RUN: llvm-spirv %t.rev.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPV-BACK
7-
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
7+
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis -opaque-pointers=0 | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
88

99
; CHECK-SPV-BACK: ExtInstImport [[Set:[0-9]+]] "OpenCL.std"
1010
; CHECK-SPV-BACK: TypeVoid [[VoidTy:[0-9]+]]

llvm-spirv/test/OpenCL.std/vstore_halfn.spvasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc
5-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
66
; RUN: llvm-spirv %t.rev.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPV-BACK
7-
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
7+
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis -opaque-pointers=0 | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
88

99
; CHECK-SPV-BACK: ExtInstImport [[Set:[0-9]+]] "OpenCL.std"
1010
; CHECK-SPV-BACK: TypeInt [[Int32:[0-9]+]] 32

llvm-spirv/test/OpenCL.std/vstorea_halfn.spvasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc
5-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
66
; RUN: llvm-spirv %t.rev.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPV-BACK
7-
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
7+
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis -opaque-pointers=0 | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
88

99
; CHECK-SPV-BACK: ExtInstImport [[Set:[0-9]+]] "OpenCL.std"
1010
; CHECK-SPV-BACK: TypeInt [[Int32:[0-9]+]] 32

llvm-spirv/test/OpenCL.std/vstoren.spvasm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
; RUN: spirv-as --target-env spv1.0 -o %t.spv %s
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv %t.spv -r --spirv-target-env=SPV-IR -o %t.rev.bc
5-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
5+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK,CHECK-SPV-IR
66
; RUN: llvm-spirv %t.rev.bc -o - -spirv-text | FileCheck %s --check-prefix=CHECK-SPV-BACK
7-
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
7+
; RUN: llvm-spirv %t.spv -r --spirv-target-env=CL2.0 -o - | llvm-dis -opaque-pointers=0 | FileCheck %s --check-prefixes=CHECK,CHECK-CL20
88

99
; CHECK-SPV-BACK: ExtInstImport [[Set:[0-9]+]] "OpenCL.std"
1010
; CHECK-SPV-BACK: TypeVoid [[VoidTy:[0-9]+]]

llvm-spirv/test/atomic_explicit_arguments.spt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
; RUN: llvm-spirv %s -to-binary -o %t.spv
3333
; RUN: spirv-val %t.spv
3434
; RUN: llvm-spirv -r --spirv-target-env=CL2.0 %t.spv -o %t.bc
35-
; RUN: llvm-dis < %t.bc | FileCheck %s
35+
; RUN: llvm-dis -opaque-pointers=0 < %t.bc | FileCheck %s
3636

3737
; CHECK: define spir_func i32 @load(i32 addrspace(4)* %obj, i32 %order, i32 %scope) #0 {
3838
; CHECK: entry:

llvm-spirv/test/extensions/EXT/SPV_EXT_shader_atomic_float_/AtomicFAddEXT.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
; RUN: llvm-as %s -o %t.bc
1+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
22
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_EXT_shader_atomic_float_add -o %t.spv
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv -to-text %t.spv -o %t.spt
55
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
66

77
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
8-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL12
8+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL12
99

1010
; RUN: llvm-spirv --spirv-target-env=CL2.0 -r %t.spv -o %t.rev.bc
11-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL20
11+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL20
1212

1313
; RUN: llvm-spirv --spirv-target-env=SPV-IR -r %t.spv -o %t.rev.bc
14-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
14+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
1515

1616
target 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"
1717
target triple = "spir64-unknown-unknown"

llvm-spirv/test/extensions/EXT/SPV_EXT_shader_atomic_float_/AtomicFAddEXTForOCL.ll

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
1-
; RUN: llvm-as %s -o %t.bc
1+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
22
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_EXT_shader_atomic_float_add -o %t.spv
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv -to-text %t.spv -o %t.spt
55
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
66

77
; RUN: llvm-spirv --spirv-target-env=CL2.0 -r %t.spv -o %t.rev.bc
8-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL20
8+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL20
99

1010
; RUN: llvm-spirv --spirv-target-env=SPV-IR -r %t.spv -o %t.rev.bc
11-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
11+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
1212

1313
target datalayout = "e-p:32:32-i64:64-v16:16-v24:32-v32:32-v48:64-v96:128-v192:256-v256:256-v512:512-v1024:1024"
1414
target triple = "spir-unknown-unknown"

llvm-spirv/test/extensions/EXT/SPV_EXT_shader_atomic_float_/AtomicFMaxEXT.ll

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
; RUN: llvm-as %s -o %t.bc
1+
; RUN: llvm-as -opaque-pointers=0 %s -o %t.bc
22
; RUN: llvm-spirv %t.bc --spirv-ext=+SPV_EXT_shader_atomic_float_min_max -o %t.spv
33
; RUN: spirv-val %t.spv
44
; RUN: llvm-spirv -to-text %t.spv -o %t.spt
55
; RUN: FileCheck < %t.spt %s --check-prefix=CHECK-SPIRV
66

77
; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
8-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL12
8+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL12
99

1010
; RUN: llvm-spirv --spirv-target-env=CL2.0 -r %t.spv -o %t.rev.bc
11-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL20
11+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-CL,CHECK-LLVM-CL20
1212

1313
; RUN: llvm-spirv --spirv-target-env=SPV-IR -r %t.spv -o %t.rev.bc
14-
; RUN: llvm-dis %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
14+
; RUN: llvm-dis -opaque-pointers=0 %t.rev.bc -o - | FileCheck %s --check-prefixes=CHECK-LLVM-SPV
1515

1616
target 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"
1717
target triple = "spir64-unknown-unknown"

0 commit comments

Comments
 (0)