[PATCH] [IR] Make {extract, insert}element accept an index of any integer type.
Michael Spencer
bigcheesegs at gmail.com
Tue Apr 29 12:25:53 PDT 2014
Updated serialization.
I audited all uses of {Insert,Extract}ElementInst and nothing makes assumptions about the type other than the bitcode reader/writer. There are lots of cases of generating a constant index, and these always use i32, but this is fine.
There are no changes needed to selection dag because it is lowered with:
SDValue InIdx = DAG.getSExtOrTrunc(getValue(I.getOperand(1)),
getCurSDLoc(), TLI.getVectorIdxTy());
So the rest of the backend already sees the type it is expecting.
http://reviews.llvm.org/D3519
Files:
docs/LangRef.rst
lib/Bitcode/Reader/BitcodeReader.cpp
lib/Bitcode/Writer/BitcodeWriter.cpp
lib/IR/Constants.cpp
lib/IR/Instructions.cpp
test/CodeGen/X86/vec_splat.ll
test/Feature/instructions.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D3519.8938.patch
Type: text/x-patch
Size: 9973 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20140429/2cfe18ab/attachment.bin>
More information about the llvm-commits
mailing list