aboutsummaryrefslogtreecommitdiffstats
path: root/lib/Transforms
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
commit53af2d13e763c2d6e8ea1baf29644d954edb999d (patch)
tree00c5476104d2b75444a94a790215cbc506cde7b3 /lib/Transforms
parenta958cbfe367ed7bf6a3a260b28a7b19cf70b7d9f (diff)
downloadexternal_llvm-53af2d13e763c2d6e8ea1baf29644d954edb999d.zip
external_llvm-53af2d13e763c2d6e8ea1baf29644d954edb999d.tar.gz
external_llvm-53af2d13e763c2d6e8ea1baf29644d954edb999d.tar.bz2
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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93202 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Transforms')
-rw-r--r--lib/Transforms/InstCombine/InstCombineCasts.cpp4
1 files changed, 1 insertions, 3 deletions
diff --git a/lib/Transforms/InstCombine/InstCombineCasts.cpp b/lib/Transforms/InstCombine/InstCombineCasts.cpp
index b5da3e6..e018b35 100644
--- a/lib/Transforms/InstCombine/InstCombineCasts.cpp
+++ b/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;