2525; clang -cc1 -triple spir -disable-llvm-passes t.cl -emit-llvm -o t.ll
2626
2727; RUN: llvm-as %s -o %t.bc
28- ; RUN: llvm-spirv %t.bc -spirv-text -o %t.txt
28+ ; RUN: llvm-spirv %t.bc --spirv-max-version=1.3 - spirv-text -o %t.txt
2929; RUN: FileCheck < %t.txt %s --check-prefix=CHECK-SPIRV
30- ; RUN: llvm-spirv %t.bc -o %t.spv
30+ ; RUN: llvm-spirv %t.bc --spirv-max-version=1.3 - o %t.spv
3131; RUN: spirv-val %t.spv
3232; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
33- ; RUN: llvm-dis < %t.rev.bc | FileCheck %s --check-prefix=CHECK-LLVM
33+ ; RUN: llvm-dis %t.rev.bc
34+ ; RUN: FileCheck < %t.rev.ll %s --check-prefix=CHECK-LLVM
35+
36+ ; RUN: llvm-spirv %t.bc --spirv-max-version=1.4 -spirv-text -o %t.txt
37+ ; RUN: FileCheck < %t.txt %s --check-prefix=ALIGN-MATCH-SPIRV
38+ ; RUN: llvm-spirv %t.bc --spirv-max-version=1.4 -o %t.spv
39+ ; RUN: spirv-val %t.spv
40+ ; RUN: llvm-spirv -r %t.spv -o %t.rev.bc
41+ ; RUN: llvm-dis %t.rev.bc
42+ ; RUN: FileCheck < %t.rev.ll %s --check-prefix=ALIGN-MATCH-LLVM
3443
3544target 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"
3645target triple = "spir"
@@ -53,8 +62,10 @@ entry:
5362 %b1 = getelementptr inbounds %struct.A , %struct.A* %agg.result , i32 0 , i32 1
5463 %2 = bitcast %struct.B* %b1 to i8*
5564 %3 = bitcast %struct.B* %b to i8*
56- ; CHECK-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 4
65+ ; CHECK-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 2 4
5766; CHECK-LLVM: call void @llvm.memcpy.p0.p0.i32(ptr align 4 {{%[0-9]+}}, ptr align 4 {{%[0-9]+}}, i32 8, i1 false)
67+ ; ALIGN-MATCH-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 2 8 2 4
68+ ; ALIGN-MATCH-LLVM: call void @llvm.memcpy.p0.p0.i32(ptr align 8 {{%[0-9]+}}, ptr align 4 {{%[0-9]+}}, i32 8, i1 false)
5869 call void @llvm.memcpy.p0i8.p0i8.i32 (i8* align 8 %2 , i8* align 4 %3 , i32 8 , i1 false ), !tbaa.struct !4
5970 %4 = bitcast %struct.B* %b to i8*
6071 call void @llvm.lifetime.end.p0i8 (i64 8 , i8* %4 ) #2
@@ -85,8 +96,10 @@ entry:
8596 %b = getelementptr inbounds %struct.A , %struct.A* %a , i32 0 , i32 1
8697 %2 = bitcast %struct.B* %agg.result to i8*
8798 %3 = bitcast %struct.B* %b to i8*
88- ; CHECK-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 4
99+ ; CHECK-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 2 4
89100; CHECK-LLVM: call void @llvm.memcpy.p0.p0.i32(ptr align 4 {{%[0-9]+}}, ptr align 4 {{%[0-9]+}}, i32 8, i1 false)
101+ ; ALIGN-MATCH-SPIRV: CopyMemorySized {{[0-9]+}} {{[0-9]+}} {{[0-9]+}} 2 4 2 8
102+ ; ALIGN-MATCH-LLVM: call void @llvm.memcpy.p0.p0.i32(ptr align 4 {{%[0-9]+}}, ptr align 8 {{%[0-9]+}}, i32 8, i1 false)
90103 call void @llvm.memcpy.p0i8.p0i8.i32 (i8* align 4 %2 , i8* align 8 %3 , i32 8 , i1 false ), !tbaa.struct !4
91104 %4 = bitcast %struct.A* %a to i8*
92105 call void @llvm.lifetime.end.p0i8 (i64 16 , i8* %4 ) #2
0 commit comments