[llvm-commits] [llvm] r58964 - in /llvm/trunk: docs/LangRef.html lib/Bitcode/Reader/BitcodeReader.cpp lib/CodeGen/SelectionDAG/DAGCombiner.cpp lib/CodeGen/SelectionDAG/LegalizeDAG.cpp lib/CodeGen/SelectionDAG/LegalizeTypes.h lib/CodeGen/SelectionDAG/LegalizeVectorTypes.cpp lib/CodeGen/SelectionDAG/SelectionDAG.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuild.cpp lib/Transforms/Scalar/InstructionCombining.cpp lib/VMCore/ConstantFold.cpp lib/VMCore/Instructions.cpp lib/VMCore/Verifier.cpp
Chris Lattner
clattner at apple.com
Sat Nov 15 22:29:15 PST 2008
On Nov 9, 2008, at 8:46 PM, Mon P Wang wrote:
> URL: http://llvm.org/viewvc/llvm-project?rev=58964&view=rev
> Log:
> Added support for the following definition of shufflevector
> <result> = shufflevector <n x <ty>> <v1>, <n x <ty>> <v2>, <m x i32>
> <mask>
Very nice Mon Ping!
One import comment though:
> +++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Sun Nov 9
> 22:46:22 2008
> @@ -1592,16 +1592,12 @@
> getValue(Record, OpNum, Vec1->getType(), Vec2))
> return Error("Invalid SHUFFLEVEC record");
>
> - const Type *MaskTy =
> - VectorType::get(Type::Int32Ty,
> - cast<VectorType>(Vec1->getType())-
> >getNumElements());
> -
> - if (getValue(Record, OpNum, MaskTy, Mask))
> + if (getValueTypePair(Record, OpNum, NextValueNo, Mask))
> return Error("Invalid SHUFFLEVEC record");
> I = new ShuffleVectorInst(Vec1, Vec2, Mask);
> break;
> }
AFAICT, this will break compatibility with LLVM 2.4 bc files. This
isn't good. It should be possible to check the number of operands in
Record. If there are N+1 entries, it is the new format, if there are
N, it is the old format. Please verify that you can read 2.4 (or
earlier) bc files with shuffles in them.
-Chris
More information about the llvm-commits
mailing list