[libc-commits] [compiler-rt] [lldb] [flang] [libc] [libcxxabi] [llvm] [lld] [libcxx] [clang] [libclc] [clang-tools-extra] [VPlan] Add new VPScalarCastRecipe, use for IV & step trunc. (PR #78113)
    Florian Hahn via libc-commits 
    libc-commits at lists.llvm.org
       
    Thu Jan 25 03:32:34 PST 2024
    
    
  
================
@@ -230,7 +230,11 @@ Type *VPTypeAnalysis::inferScalarType(const VPValue *V) {
             return V->getUnderlyingValue()->getType();
           })
           .Case<VPWidenCastRecipe>(
-              [](const VPWidenCastRecipe *R) { return R->getResultType(); });
+              [](const VPWidenCastRecipe *R) { return R->getResultType(); })
+          .Case<VPExpandSCEVRecipe>([](const VPExpandSCEVRecipe *R) {
----------------
fhahn wrote:
VPDerivedIVRecipe getScalarType would be good to remove, will do as follow-up.
`VPWidenIntOrFpInductionRecipe's` trunc drives truncating the start value and step, effectively creating a narrow phi. I'll check to see if this can also be modeled with the new recipe.
https://github.com/llvm/llvm-project/pull/78113
    
    
More information about the libc-commits
mailing list