[llvm] [DirectX] Legalize lifetime intrinsics for DXIL (PR #148003)
Deric C. via llvm-commits
llvm-commits at lists.llvm.org
Fri Jul 11 09:49:34 PDT 2025
================
@@ -15,6 +16,14 @@
; CHECK-SM66-NEXT: store i32 0, ptr [[GEP]], align 4
; CHECK-SM66-NEXT: call void @llvm.lifetime.end.p0(i64 4, ptr nonnull [[ACCUM_I_FLAT]])
;
+; CHECK-PREPARE-NEXT: [[ACCUM_I_FLAT:%.*]] = alloca [1 x i32], align 4
+; CHECK-PREPARE-NEXT: [[GEP:%.*]] = getelementptr i32, ptr [[ACCUM_I_FLAT]], i32 0
+; CHECK-PREPARE-NEXT: [[BITCAST:%.*]] = bitcast ptr [[ACCUM_I_FLAT]] to ptr
+; CHECK-PREPARE-NEXT: call void @llvm.lifetime.start.p0(i64 4, ptr nonnull [[BITCAST]])
+; CHECK-PREPARE-NEXT: store i32 0, ptr [[GEP]], align 4
+; CHECK-PREPARE-NEXT: [[BITCAST:%.*]] = bitcast ptr [[ACCUM_I_FLAT]] to ptr
----------------
Icohedron wrote:
dxil-prepare inserts bitcasts for other instructions too, so I think this should be a suggestion for dxil-prepare as a whole and not just bitcasts for lifetimes intrinsics only.
https://github.com/llvm/llvm-project/pull/148003
More information about the llvm-commits
mailing list