[llvm] remove extraneous comma in OpLifetimeStart and OpLifetimeStop (PR #129025)

via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 28 04:12:39 PST 2025


https://github.com/VishMCW updated https://github.com/llvm/llvm-project/pull/129025

>From d5b73ea2385f70bfb81a1cb1c0710df2475bb442 Mon Sep 17 00:00:00 2001
From: VishMCW <vishakh.prakash at multicorewareinc.com>
Date: Thu, 27 Feb 2025 14:58:03 +0530
Subject: [PATCH] remove extraneous comma in OpLifetimeStart and OpLifetimeStop

TEST:
- Update test files fo use OpLifetimeStart and OpLifetimeStop correctly
---
 llvm/lib/Target/SPIRV/SPIRVInstrInfo.td             |  4 ++--
 llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll | 12 ++++++------
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/llvm/lib/Target/SPIRV/SPIRVInstrInfo.td b/llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
index 5e9a9bd145bca..121101a7f21b0 100644
--- a/llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
+++ b/llvm/lib/Target/SPIRV/SPIRVInstrInfo.td
@@ -662,8 +662,8 @@ let isReturn = 1, hasDelaySlot = 0, isBarrier = 0, isTerminator = 1, isNotDuplic
   def OpReturnValue: Op<254, (outs), (ins ID:$ret), "OpReturnValue $ret">;
   def OpUnreachable: SimpleOp<"OpUnreachable", 255>;
 }
-def OpLifetimeStart: Op<256, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStart $ptr, $sz">;
-def OpLifetimeStop: Op<257, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStop $ptr, $sz">;
+def OpLifetimeStart: Op<256, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStart $ptr $sz">;
+def OpLifetimeStop: Op<257, (outs), (ins ID:$ptr, i32imm:$sz), "OpLifetimeStop $ptr $sz">;
 def OpDemoteToHelperInvocation: SimpleOp<"OpDemoteToHelperInvocation", 5380>;
 
 // 3.42.18 Atomic Instructions
diff --git a/llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll b/llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll
index 45683585d6514..f302508c4df0d 100644
--- a/llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll
+++ b/llvm/test/CodeGen/SPIRV/llvm-intrinsics/lifetime.ll
@@ -13,12 +13,12 @@
 ; CHECK: OpFunction
 ; CHECK: %[[#FooVar:]] = OpVariable
 ; CHECK: %[[#Casted1:]] = OpBitcast %[[#PtrChar]] %[[#FooVar]]
-; CHECK: OpLifetimeStart %[[#Casted1]], 72
+; CHECK: OpLifetimeStart %[[#Casted1]] 72
 ; CHECK: OpCopyMemorySized
 ; CHECK: OpBitcast
 ; CHECK: OpInBoundsPtrAccessChain
 ; CHECK: %[[#Casted2:]] = OpBitcast %[[#PtrChar]] %[[#FooVar]]
-; CHECK: OpLifetimeStop %[[#Casted2]], 72
+; CHECK: OpLifetimeStop %[[#Casted2]] 72
 define spir_func void @foo(ptr noundef byval(%tprange) align 8 %_arg_UserRange) {
   %RoundedRangeKernel = alloca %tprange, align 8
   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)
 
 ; CHECK: OpFunction
 ; CHECK: %[[#BarVar:]] = OpVariable
-; CHECK: OpLifetimeStart %[[#BarVar]], 0
+; CHECK: OpLifetimeStart %[[#BarVar]] 0
 ; CHECK: OpCopyMemorySized
 ; CHECK: OpBitcast
 ; CHECK: OpInBoundsPtrAccessChain
-; CHECK: OpLifetimeStop %[[#BarVar]], 0
+; CHECK: OpLifetimeStop %[[#BarVar]] 0
 define spir_func void @bar(ptr noundef byval(%tprange) align 8 %_arg_UserRange) {
   %RoundedRangeKernel = alloca %tprange, align 8
   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)
 
 ; CHECK: OpFunction
 ; CHECK: %[[#TestVar:]] = OpVariable
-; CHECK: OpLifetimeStart %[[#TestVar]], 1
+; CHECK: OpLifetimeStart %[[#TestVar]] 1
 ; CHECK: OpCopyMemorySized
 ; CHECK: OpInBoundsPtrAccessChain
-; CHECK: OpLifetimeStop %[[#TestVar]], 1
+; CHECK: OpLifetimeStop %[[#TestVar]] 1
 define spir_func void @test(ptr noundef align 8 %_arg) {
   %var = alloca i8, align 8
   call void @llvm.lifetime.start.p0(i64 1, ptr nonnull %var)



More information about the llvm-commits mailing list