[clang] [llvm] [LV] Support generating masks for switch terminators. (PR #99808)
    Kolya Panchenko via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Wed Jul 31 15:05:53 PDT 2024
    
    
  
================
@@ -7763,6 +7763,41 @@ VPValue *VPRecipeBuilder::createEdgeMask(BasicBlock *Src, BasicBlock *Dst) {
 
   VPValue *SrcMask = getBlockInMask(Src);
 
+  if (auto *SI = dyn_cast<SwitchInst>(Src->getTerminator())) {
+    // Create mask where the terminator in Src is a switch. We need to handle 2
+    // separate cases:
+    // 1. Dst is not the default desintation. Dst is reached if any of the cases
----------------
nikolaypanchenko wrote:
`desintation` -> `destination`
https://github.com/llvm/llvm-project/pull/99808
    
    
More information about the llvm-commits
mailing list