[llvm-commits] [llvm] r125458 - in /llvm/trunk: lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp test/CodeGen/X86/crash.ll
Chris Lattner
clattner at apple.com
Sun Feb 13 11:03:13 PST 2011
On Feb 13, 2011, at 3:28 AM, Duncan Sands wrote:
>> --- llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp (original)
>> +++ llvm/trunk/lib/CodeGen/SelectionDAG/LegalizeIntegerTypes.cpp Sun Feb 13 03:10:56 2011
>> @@ -1167,13 +1167,19 @@
>> unsigned NVTBits = NVT.getSizeInBits();
>> EVT ShTy = N->getOperand(1).getValueType();
>>
>> + // If this is a large integer being legalized (e.g. an i512) then plop the
>> + // shift amount down as a fixed i32. The target shift amount may be something
>> + // like i8, but this isn't enough to represent the shift amount.
>> + if (NVTBits> 256)
>> + ShTy = MVT::i32;
>
> I'm confused as to why this helps. ShTy was defined (see above) to be
> N->getOperand(1).getValueType() How can that ever be too small?
You're right, there is a more general and quite pervasive problem here. I'll revisit this.
-Chris
More information about the llvm-commits
mailing list