[PATCH] [IR] Make {extract, insert}element accept an index of any integer type.

Chris Lattner clattner at apple.com
Wed Apr 30 21:01:20 PDT 2014


On Apr 29, 2014, at 12:25 PM, Michael Spencer <bigcheesegs at gmail.com> wrote:

> 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.

Ok.

> 
> 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.

LGTM then, thanks!

-Chris



More information about the llvm-commits mailing list