[llvm-commits] [dragonegg] r132837 - /dragonegg/trunk/src/Convert.cpp

Duncan Sands baldrick at free.fr
Fri Jun 10 00:52:49 PDT 2011


Author: baldrick
Date: Fri Jun 10 02:52:49 2011
New Revision: 132837

URL: http://llvm.org/viewvc/llvm-project?rev=132837&view=rev
Log:
Fix thinko: the shuffle mask needs to be a vector of i32, not a vector
of whatever integer type is being shuffled.

Modified:
    dragonegg/trunk/src/Convert.cpp

Modified: dragonegg/trunk/src/Convert.cpp
URL: http://llvm.org/viewvc/llvm-project/dragonegg/trunk/src/Convert.cpp?rev=132837&r1=132836&r2=132837&view=diff
==============================================================================
--- dragonegg/trunk/src/Convert.cpp (original)
+++ dragonegg/trunk/src/Convert.cpp Fri Jun 10 02:52:49 2011
@@ -6803,8 +6803,10 @@
                           /*isSigned*/false);
       RHS = Builder.CreateInsertElement(UndefValue::get(VecTy), RHS,
                                         Builder.getInt32(0));
+      const Type *MaskTy = VectorType::get(Type::getInt32Ty(Context),
+                                           VecTy->getNumElements());
       RHS = Builder.CreateShuffleVector(RHS, UndefValue::get(VecTy),
-                                        ConstantInt::get(VecTy, 0));
+                                        ConstantInt::get(MaskTy, 0));
     }
   }
   return Builder.CreateBinOp((Instruction::BinaryOps)Opc, LHS, RHS);





More information about the llvm-commits mailing list