summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2005-12-23 05:48:07 +0000
committerChris Lattner <sabre@nondot.org>2005-12-23 05:48:07 +0000
commit26943b9691e4476b2644ffef6e6d3e78028a2fbd (patch)
tree3d3d825dfa80c0b81af49af14eeb05435c27baf1 /llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
parent54560f6887d712a674484909d1f818b7bd1c553c (diff)
downloadbcm5719-llvm-26943b9691e4476b2644ffef6e6d3e78028a2fbd.tar.gz
bcm5719-llvm-26943b9691e4476b2644ffef6e6d3e78028a2fbd.zip
Simplify store(bitconv(x)) to store(x). This allows us to compile this:
void bar(double Y, double *X) { *X = Y; } to this: bar: save -96, %o6, %o6 st %i1, [%i2+4] st %i0, [%i2] restore %g0, %g0, %g0 retl nop instead of this: bar: save -104, %o6, %o6 st %i1, [%i6+-4] st %i0, [%i6+-8] ldd [%i6+-8], %f0 std %f0, [%i2] restore %g0, %g0, %g0 retl nop on sparcv8. llvm-svn: 24983
Diffstat (limited to 'llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
-rw-r--r--llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index f08fd10413c..52e8391f372 100644
--- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -2081,6 +2081,11 @@ SDOperand DAGCombiner::visitSTORE(SDNode *N) {
return SDOperand(N, 0);
}
+ // If this is a store of a bit convert, store the input value.
+ if (Value.getOpcode() == ISD::BIT_CONVERT)
+ return DAG.getNode(ISD::STORE, MVT::Other, Chain, Value.getOperand(0),
+ Ptr, SrcValue);
+
return SDOperand();
}
OpenPOWER on IntegriCloud