[llvm-commits] [llvm] r86670 - in /llvm/trunk: lib/Transforms/Scalar/InstructionCombining.cpp test/Transforms/InstCombine/cast-mul-select.ll test/Transforms/InstCombine/cast.ll
Chris Lattner
sabre at nondot.org
Tue Nov 10 09:31:25 PST 2009
On Nov 10, 2009, at 9:09 AM, Duncan Sands 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.
I don't think it's worth it to worry about this. Particularly when
dealing with funny sized integers, doing 'safe' obviously profitable
transformations only seems prudent.
-Chris
More information about the llvm-commits
mailing list