diff options
author | Chris Lattner <sabre@nondot.org> | 2010-04-15 05:40:59 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-04-15 05:40:59 +0000 |
commit | 6ebd8674eb049b254c769ecfe24dd8401eb4142b (patch) | |
tree | ef1d02b9db37156e8a81e0cf16862ce530f8e4ab /llvm/lib | |
parent | f9b2e3c68acb7a8188b5bd735216d207279bae9d (diff) | |
download | bcm5719-llvm-6ebd8674eb049b254c769ecfe24dd8401eb4142b.tar.gz bcm5719-llvm-6ebd8674eb049b254c769ecfe24dd8401eb4142b.zip |
teach codegen to turn trunc(zextload) into load when possible.
This doesn't occur much at all, it only seems to formed in the case
when the trunc optimization kicks in due to phase ordering. In that
case it is saves a few bytes on x86-32.
llvm-svn: 101350
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index 5974aff03ca..69a26169053 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -3637,7 +3637,7 @@ SDValue DAGCombiner::ReduceLoadWidth(SDNode *N) { // Do not generate loads of non-round integer types since these can // be expensive (and would be wrong if the type is not byte sized). if (isa<LoadSDNode>(N0) && N0.hasOneUse() && ExtVT.isRound() && - cast<LoadSDNode>(N0)->getMemoryVT().getSizeInBits() > EVTBits && + cast<LoadSDNode>(N0)->getMemoryVT().getSizeInBits() >= EVTBits && // Do not change the width of a volatile load. !cast<LoadSDNode>(N0)->isVolatile()) { LoadSDNode *LN0 = cast<LoadSDNode>(N0); |