Bugfix: When looking for a legal vector type, stop looking when a non-simple
authorNadav Rotem <nadav.rotem@intel.com>
Sun, 12 Jun 2011 14:40:30 +0000 (14:40 +0000)
committerNadav Rotem <nadav.rotem@intel.com>
Sun, 12 Jun 2011 14:40:30 +0000 (14:40 +0000)
element type is found.
This fix addresses some of the tests in Duncan's testcase (forthcoming).

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@132891 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetLowering.h

index 3e36fb7bb54efe42b96a4fbdc4ed355524d2f6b5..093e79b1c1cd2ac50c971671c7e13b0aba71e152 100644 (file)
@@ -1853,6 +1853,7 @@ private:
       // If there is no simple vector type with this many elements then there
       // cannot be a larger legal vector type.  Note that this assumes that
       // there are no skipped intermediate vector types in the simple types.
+      if (!EltVT.isSimple()) break;
       MVT LargerVector = MVT::getVectorVT(EltVT.getSimpleVT(), NumElts);
       if (LargerVector == MVT()) break;