Skip to content

Commit d5b73ea

Browse files
committed
remove extraneous comma in OpLifetimeStart and OpLifetimeStop
TEST: - Update test files fo use OpLifetimeStart and OpLifetimeStop correctly
1 parent f5ee401 commit d5b73ea

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

llvm/lib/Target/SPIRV/SPIRVInstrInfo.td

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -662,8 +662,8 @@ let isReturn = 1, hasDelaySlot = 0, isBarrier = 0, isTerminator = 1, isNotDuplic
662662
def OpReturnValue: Op<254, (outs), (ins ID:$ret), "OpReturnValue $ret">;
663663
def OpUnreachable: SimpleOp<"OpUnreachable", 255>;
664664
}
665-
def OpLifetimeStart: Op<256, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStart $ptr, $sz">;
666-
def OpLifetimeStop: Op<257, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStop $ptr, $sz">;
665+
def OpLifetimeStart: Op<256, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStart $ptr $sz">;
666+
def OpLifetimeStop: Op<257, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStop $ptr $sz">;
667667
def OpDemoteToHelperInvocation: SimpleOp<"OpDemoteToHelperInvocation", 5380>;
668668

669669
// 3.42.18 Atomic Instructions

llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,12 @@
1313
; CHECK: OpFunction
1414
; CHECK: %[[#FooVar:]] = OpVariable
1515
; CHECK: %[[#Casted1:]] = OpBitcast %[[#PtrChar]] %[[#FooVar]]
16-
; CHECK: OpLifetimeStart %[[#Casted1]], 72
16+
; CHECK: OpLifetimeStart %[[#Casted1]] 72
1717
; CHECK: OpCopyMemorySized
1818
; CHECK: OpBitcast
1919
; CHECK: OpInBoundsPtrAccessChain
2020
; CHECK: %[[#Casted2:]] = OpBitcast %[[#PtrChar]] %[[#FooVar]]
21-
; CHECK: OpLifetimeStop %[[#Casted2]], 72
21+
; CHECK: OpLifetimeStop %[[#Casted2]] 72
2222
define spir_func void @foo(ptr noundef byval(%tprange) align 8 %_arg_UserRange) {
2323
%RoundedRangeKernel = alloca %tprange, align 8
2424
call void @llvm.lifetime.start.p0(i64 72, ptr nonnull %RoundedRangeKernel)
@@ -30,11 +30,11 @@ define spir_func void @foo(ptr noundef byval(%tprange) align 8 %_arg_UserRange)
3030

3131
; CHECK: OpFunction
3232
; CHECK: %[[#BarVar:]] = OpVariable
33-
; CHECK: OpLifetimeStart %[[#BarVar]], 0
33+
; CHECK: OpLifetimeStart %[[#BarVar]] 0
3434
; CHECK: OpCopyMemorySized
3535
; CHECK: OpBitcast
3636
; CHECK: OpInBoundsPtrAccessChain
37-
; CHECK: OpLifetimeStop %[[#BarVar]], 0
37+
; CHECK: OpLifetimeStop %[[#BarVar]] 0
3838
define spir_func void @bar(ptr noundef byval(%tprange) align 8 %_arg_UserRange) {
3939
%RoundedRangeKernel = alloca %tprange, align 8
4040
call void @llvm.lifetime.start.p0(i64 -1, ptr nonnull %RoundedRangeKernel)
@@ -46,10 +46,10 @@ define spir_func void @bar(ptr noundef byval(%tprange) align 8 %_arg_UserRange)
4646

4747
; CHECK: OpFunction
4848
; CHECK: %[[#TestVar:]] = OpVariable
49-
; CHECK: OpLifetimeStart %[[#TestVar]], 1
49+
; CHECK: OpLifetimeStart %[[#TestVar]] 1
5050
; CHECK: OpCopyMemorySized
5151
; CHECK: OpInBoundsPtrAccessChain
52-
; CHECK: OpLifetimeStop %[[#TestVar]], 1
52+
; CHECK: OpLifetimeStop %[[#TestVar]] 1
5353
define spir_func void @test(ptr noundef align 8 %_arg) {
5454
%var = alloca i8, align 8
5555
call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %var)

0 commit comments

Comments
 (0)