summaryrefslogtreecommitdiffstats
path: root/llvm
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2010-01-11 22:49:40 +0000
committerChris Lattner <sabre@nondot.org>2010-01-11 22:49:40 +0000
commitd1a3efedd8384f7aa973b0f0d51d00a14216579a (patch)
tree076d8ec55200aac35eb18ba26e8015a2fdca039a /llvm
parent1c2cb6df9ef500613988a6e691a0fbf998c635e4 (diff)
downloadbcm5719-llvm-d1a3efedd8384f7aa973b0f0d51d00a14216579a.tar.gz
bcm5719-llvm-d1a3efedd8384f7aa973b0f0d51d00a14216579a.zip
reenable the piece that turns trunc(zext(x)) -> x even if zext has multiple uses,
codegen has no apparent problem with the trunc version of this, because it turns into a simple subreg idiom llvm-svn: 93202
Diffstat (limited to 'llvm')
-rw-r--r--llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
index b5da3e615be..e018b351082 100644
--- a/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/llvm/lib/Transforms/InstCombine/InstCombineCasts.cpp
@@ -327,9 +327,7 @@ static bool CanEvaluateTruncated(Value *V, const Type *Ty) {
// If this is an extension from the dest type, we can eliminate it, even if it
// has multiple uses.
- // FIXME: This is currently disabled until codegen can handle this without
- // pessimizing code, PR5997.
- if (0 && (isa<ZExtInst>(I) || isa<SExtInst>(I)) &&
+ if ((isa<ZExtInst>(I) || isa<SExtInst>(I)) &&
I->getOperand(0)->getType() == Ty)
return true;
OpenPOWER on IntegriCloud