diff options
| author | Duncan Sands <baldrick@free.fr> | 2008-06-09 15:48:25 +0000 |
|---|---|---|
| committer | Duncan Sands <baldrick@free.fr> | 2008-06-09 15:48:25 +0000 |
| commit | 893076354a9fdb915cda27678570914dfd5732fa (patch) | |
| tree | 2b795fe6a83c7aa6f01177f7f051be35d19a7538 /lib/CodeGen/SelectionDAG/DAGCombiner.cpp | |
| parent | 8a6ccb5f73cf2e490faa181ad6662633b3ee38df (diff) | |
Various tweaks related to apint codegen. No functionality
change for non-funky-sized integers.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@52151 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/SelectionDAG/DAGCombiner.cpp')
| -rw-r--r-- | lib/CodeGen/SelectionDAG/DAGCombiner.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp index ea96e5c9ce..8696bcf63b 100644 --- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp +++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp @@ -1785,7 +1785,7 @@ SDOperand DAGCombiner::visitAND(SDNode *N) { // Loading a non-byte sized integer is only valid if the extra bits // in memory that complete the byte are zero, which is not known here. // TODO: remove isSimple check when apint codegen support lands. - EVT.isSimple() && EVT.getSizeInBits() == EVT.getStoreSizeInBits() && + EVT.isSimple() && EVT.isByteSized() && (!AfterLegalize || TLI.isLoadXLegal(ISD::ZEXTLOAD, EVT))) { MVT PtrType = N0.getOperand(1).getValueType(); // For big endian targets, we need to add an offset to the pointer to @@ -3181,7 +3181,7 @@ SDOperand DAGCombiner::ReduceLoadWidth(SDNode *N) { // Do not allow folding to a non-byte-sized integer here. These only // load correctly if the extra bits in memory that complete the byte // are zero, which is not known here. - VT.getSizeInBits() == VT.getStoreSizeInBits()) { + VT.isByteSized()) { assert(N0.getValueType().getSizeInBits() > EVTBits && "Cannot truncate to larger type!"); LoadSDNode *LN0 = cast<LoadSDNode>(N0); |
