[llvm] 5aa1119 - GlobalISel: Assert if MoreElements uses a non-vector type

Matt Arsenault via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 30 07:36:11 PDT 2020


Author: Matt Arsenault
Date: 2020-09-30T10:36:00-04:00
New Revision: 5aa1119537fe6569b54d0da4d9d649a6940decff

URL: https://github.com/llvm/llvm-project/commit/5aa1119537fe6569b54d0da4d9d649a6940decff
DIFF: https://github.com/llvm/llvm-project/commit/5aa1119537fe6569b54d0da4d9d649a6940decff.diff

LOG: GlobalISel: Assert if MoreElements uses a non-vector type

Added: 
    

Modified: 
    llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp

Removed: 
    


################################################################################
diff  --git a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
index d14682ccc054..30acac14bc5f 100644
--- a/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
+++ b/llvm/lib/CodeGen/GlobalISel/LegalizerInfo.cpp
@@ -148,7 +148,8 @@ static bool mutationIsSane(const LegalizeRule &Rule,
         if (NewTy.getNumElements() <= OldElts)
           return false;
       }
-    }
+    } else if (Rule.getAction() == MoreElements)
+      return false;
 
     // Make sure the element type didn't change.
     return NewTy.getScalarType() == OldTy.getScalarType();


        


More information about the llvm-commits mailing list