[llvm] [VPlan] Support live-ins without underlying IR in type analysis. (PR #80723)

Florian Hahn via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 21 11:09:24 PST 2024


================
@@ -207,8 +202,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
   if (Type *CachedTy = CachedTypes.lookup(V))
     return CachedTy;
 
-  if (V->isLiveIn())
-    return V->getLiveInIRValue()->getType();
+  if (V->isLiveIn()) {
+    if (auto *IRValue = V->getLiveInIRValue())
+      return IRValue->getType();
----------------
fhahn wrote:

Added a comment ,thanks!

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


More information about the llvm-commits mailing list