[llvm] r204738 - [Stackmaps][X86TTI] Fix think-o in getIntImmCost calculation.
Juergen Ributzka
juergen at apple.com
Wed Apr 2 14:22:27 PDT 2014
I added a test case in r205464.
On Mar 31, 2014, at 3:58 PM, Eric Christopher <echristo at gmail.com> wrote:
> Testcase?
>
> -eric
>
> On Tue, Mar 25, 2014 at 11:01 AM, Juergen Ributzka <juergen at apple.com> wrote:
>> Author: ributzka
>> Date: Tue Mar 25 13:01:23 2014
>> New Revision: 204738
>>
>> URL: http://llvm.org/viewvc/llvm-project?rev=204738&view=rev
>> Log:
>> [Stackmaps][X86TTI] Fix think-o in getIntImmCost calculation.
>>
>> The cost for the first four stackmap operands was always TCC_Free.
>> This is only true for the first two operands. All other operands
>> are TCC_Free if they are within 64bit.
>>
>> Modified:
>> llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
>>
>> Modified: llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp
>> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp?rev=204738&r1=204737&r2=204738&view=diff
>> ==============================================================================
>> --- llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp (original)
>> +++ llvm/trunk/lib/Target/X86/X86TargetTransformInfo.cpp Tue Mar 25 13:01:23 2014
>> @@ -858,17 +858,16 @@ unsigned X86TTI::getIntImmCost(Intrinsic
>> case Intrinsic::umul_with_overflow:
>> if ((Idx == 1) && Imm.getBitWidth() <= 64 && isInt<32>(Imm.getSExtValue()))
>> return TCC_Free;
>> - else
>> - return X86TTI::getIntImmCost(Imm, Ty);
>> + break;
>> case Intrinsic::experimental_stackmap:
>> - if (Idx < 2)
>> + if ((Idx < 2) || (Imm.getBitWidth() <= 64 && isInt<64>(Imm.getSExtValue())))
>> return TCC_Free;
>> + break;
>> case Intrinsic::experimental_patchpoint_void:
>> case Intrinsic::experimental_patchpoint_i64:
>> - if ((Idx < 4 ) ||
>> - (Imm.getBitWidth() <= 64 && isInt<64>(Imm.getSExtValue())))
>> + if ((Idx < 4) || (Imm.getBitWidth() <= 64 && isInt<64>(Imm.getSExtValue())))
>> return TCC_Free;
>> - else
>> - return X86TTI::getIntImmCost(Imm, Ty);
>> + break;
>> }
>> + return X86TTI::getIntImmCost(Imm, Ty);
>> }
>>
>>
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
More information about the llvm-commits
mailing list