PATCH: SelectionDAG: Use MVT::i32 for vector indices
Owen Anderson
resistor at mac.com
Mon Aug 5 12:19:44 PDT 2013
On Aug 5, 2013, at 11:36 AM, Tom Stellard <tom at stellard.net> wrote:
> On Mon, Aug 05, 2013 at 10:26:05AM -0700, Tom Stellard wrote:
>> On Mon, Aug 05, 2013 at 10:18:37AM -0700, Owen Anderson wrote:
>>>
>>> On Aug 5, 2013, at 9:51 AM, Tom Stellard <tom at stellard.net> wrote:
>>>
>>>> On Thu, Aug 01, 2013 at 07:34:30AM -0700, Tom Stellard wrote:
>>>>> On Wed, Jul 31, 2013 at 10:09:03PM -0700, Owen Anderson wrote:
>>>>>>
>>>>>> On Jul 31, 2013, at 7:25 PM, Tom Stellard <tom at stellard.net> wrote:
>>>>>>
>>>>>>>>
>>>>>>>> The first version of this patch that I wrote:
>>>>>>>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130715/181799.html
>>>>>>>> added TargetLowering::getVectorIdxTy() which targets could use to specify
>>>>>>>> whatever type the wanted. What do you think of using the version one patch
>>>>>>>> instead?
>>>>>>>>
>>>>>>>
>>>>>>> Ping.
>>>>>>
>>>>>> FWIW, I prefer the approach using a target-specified type.
>>>>>>
>>>>>
>>>>> Thanks Owen,
>>>>>
>>>>> Do you any comments on my original patch?
>>>>>
>>>>> http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20130715/181799.html
>>>>>
>>>
>>>
>>>> - SDValue Idx = ZExtPromotedInteger(N->getOperand(2));
>>>> + SDValue Idx = DAG.getZExtOrTrunc(N->getOperand(2), SDLoc(N), MVT::i32);
>>> Should this be a parameterized type rather than i32?
>>>
>>
>> Yes it should, I will fix this.
>>
>
> Hi Owen,
>
> Here is an updated patch, which fixes the problem you pointed out plus
> fixes the index size for a few more EXTRACT_VECTOR_ELT creations which
> were added since I first wrote this patch.
>
> -Tom
> <0001-TargetLowering-Add-getVectorIdxTy-function-v2.patch>
LGTM.
--Owen
More information about the llvm-commits
mailing list