From: Juergen Ributzka Date: Tue, 25 Mar 2014 18:01:23 +0000 (+0000) Subject: [Stackmaps][X86TTI] Fix think-o in getIntImmCost calculation. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e987eb12b66a5e3b265802d924d43d57020eabce;p=oota-llvm.git [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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204738 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Target/X86/X86TargetTransformInfo.cpp b/lib/Target/X86/X86TargetTransformInfo.cpp index 87a5dd6536b..46a1e16d4f9 100644 --- a/lib/Target/X86/X86TargetTransformInfo.cpp +++ b/lib/Target/X86/X86TargetTransformInfo.cpp @@ -858,17 +858,16 @@ unsigned X86TTI::getIntImmCost(Intrinsic::ID IID, unsigned Idx, 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); }