diff options
author | Evan Cheng <evan.cheng@apple.com> | 2007-03-23 22:13:36 +0000 |
---|---|---|
committer | Evan Cheng <evan.cheng@apple.com> | 2007-03-23 22:13:36 +0000 |
commit | a883b58cafd0a0a34cd1f4eb5e988271f2fcff0e (patch) | |
tree | 1f8219d31903d4db33dcbf4304ea0a0ee6f3861b /llvm/lib/CodeGen | |
parent | 562b715dd1e7163317c6e443ad013482e36ca7cb (diff) | |
download | bcm5719-llvm-a883b58cafd0a0a34cd1f4eb5e988271f2fcff0e.tar.gz bcm5719-llvm-a883b58cafd0a0a34cd1f4eb5e988271f2fcff0e.zip |
Make sure SEXTLOAD of the specific type is supported on the target.
llvm-svn: 35289
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r-- | llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index df951a51bb2..569b1a91d71 100644 --- a/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -2272,9 +2272,13 @@ SDOperand DAGCombiner::ReduceLoadWidth(SDNode *N) { MVT::ValueType VT = N->getValueType(0); MVT::ValueType EVT = N->getValueType(0); + // Special case: SIGN_EXTEND_INREG is basically truncating to EVT then + // extended to VT. if (Opc == ISD::SIGN_EXTEND_INREG) { ExtType = ISD::SEXTLOAD; EVT = cast<VTSDNode>(N->getOperand(1))->getVT(); + if (AfterLegalize && !TLI.isLoadXLegal(ISD::SEXTLOAD, EVT)) + return SDOperand(); } unsigned EVTBits = MVT::getSizeInBits(EVT); |