diff options
| author | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-27 21:03:13 +0000 | 
|---|---|---|
| committer | Nadav Rotem <nadav.rotem@intel.com> | 2011-05-27 21:03:13 +0000 | 
| commit | a9effb13ddc7b008a99981b3639a65ec91a1a35c (patch) | |
| tree | 246ee9bfbd4824473fe9543dfc3981a923fbec5a /llvm/lib/Transforms | |
| parent | d368a84c916c88c1874efff9800311717953fa7d (diff) | |
| download | bcm5719-llvm-a9effb13ddc7b008a99981b3639a65ec91a1a35c.tar.gz bcm5719-llvm-a9effb13ddc7b008a99981b3639a65ec91a1a35c.zip | |
Refactor getActionType and getTypeToTransformTo ; place all of the 'decision'
code in one place. Re-apply 131534 and fix the multi-step promotion of integers.
llvm-svn: 132217
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp | 4 | 
1 files changed, 2 insertions, 2 deletions
| diff --git a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp index eb33fe23e85..db9f4ec7a42 100644 --- a/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp +++ b/llvm/lib/Transforms/Scalar/CodeGenPrepare.cpp @@ -371,9 +371,9 @@ static bool OptimizeNoopCopyExpression(CastInst *CI, const TargetLowering &TLI){    // If these values will be promoted, find out what they will be promoted    // to.  This helps us consider truncates on PPC as noop copies when they    // are. -  if (TLI.getTypeAction(SrcVT) == TargetLowering::Promote) +  if (TLI.getTypeAction(CI->getContext(), SrcVT) == TargetLowering::Promote)      SrcVT = TLI.getTypeToTransformTo(CI->getContext(), SrcVT); -  if (TLI.getTypeAction(DstVT) == TargetLowering::Promote) +  if (TLI.getTypeAction(CI->getContext(), DstVT) == TargetLowering::Promote)      DstVT = TLI.getTypeToTransformTo(CI->getContext(), DstVT);    // If, after promotion, these are the same types, this is a noop copy. | 

