[llvm-commits] [llvm] r86670 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/cast-mul-select.ll test/Transforms/InstCombine/cast.ll

Kenneth Uildriks kennethuil at gmail.com
Tue Nov 10 09:15:39 PST 2009


On Tue, Nov 10, 2009 at 11:09 AM, Duncan Sands <baldrick at free.fr> wrote:
> Chris Lattner wrote:
>>
>> On Nov 10, 2009, at 12:42 AM, Duncan Sands wrote:
>>
>>> Hi Chris,
>>>
>>>> +  // If we don't have TD, we don't know if the source/dest are legal.
>>>> +  if (!TD) return false;
>>>
>>> I guess it is reasonable to assume that if the number of bits is not
>>> divisible by 8 then it is illegal.  That said, would adding this case
>>> buy much?
>>
>> I'm not sure what you mean.  Do you mean in the case when TD is not
>> available?  If so, doing any transformation is not safe, because you
>> might be changing away from a legal type and not know it.
>
> What I'm saying is that we can be pretty sure that i44 is illegal, even if
> there is no TD.  Thus i44 -> i32 could be done even without TD.

but what about i44->i64?  Or i44->i128?

If you want the transformation to take target specific stuff into
account, feed it target data.  If you don't, you should only get
target independent transformations.

You can always run it again with target data in a target-deployment step...




More information about the llvm-commits mailing list