[llvm] [DirectX] Lower `llvm.lifetime.*` intrinsics to stores when DXIL version is lower than 1.6 (PR #147432)

Farzon Lotfi via llvm-commits llvm-commits at lists.llvm.org
Tue Jul 8 09:48:55 PDT 2025


================
@@ -745,6 +747,37 @@ class OpLowerer {
     });
   }
 
+  [[nodiscard]] bool lowerLifetimeIntrinsic(Function &F) {
+    IRBuilder<> &IRB = OpBuilder.getIRB();
+    return replaceFunction(F, [&](CallInst *CI) -> Error {
----------------
farzonl wrote:

I kind of feel like this adds unnecessary complexity. It isn't clear to me why a lambda is needed. If you can explain why it is I'll resolve this comment, but just copying a compilcated pattern doesn't seem like the right approach.

https://github.com/llvm/llvm-project/pull/147432


More information about the llvm-commits mailing list