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

Duncan Sands baldrick at free.fr
Tue Nov 10 09:09:44 PST 2009


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.

Ciao,

Duncan.



More information about the llvm-commits mailing list