summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorJuergen Ributzka <juergen@apple.com>2014-03-25 18:01:23 +0000
committerJuergen Ributzka <juergen@apple.com>2014-03-25 18:01:23 +0000
commit5eef98cf7adad848efae48ea1fdab85578e2991e (patch)
tree9ec9bfe5aec298c4e8f18feb72a5b586793ab88c /llvm/lib
parente2e16844f5aa66fa95ac427e55648df9950493ed (diff)
downloadbcm5719-llvm-5eef98cf7adad848efae48ea1fdab85578e2991e.tar.gz
bcm5719-llvm-5eef98cf7adad848efae48ea1fdab85578e2991e.zip
[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. llvm-svn: 204738
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/X86/X86TargetTransformInfo.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp b/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
index 87a5dd6536b..46a1e16d4f9 100644
--- a/llvm/lib/Target/X86/X86TargetTransformInfo.cpp
+++ b/llvm/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);
}
OpenPOWER on IntegriCloud