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
diff --git a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
index ea96e5c..8696bcf 100644
--- a/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
+++ b/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
@@ -1785,7 +1785,7 @@
           // 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 @@
       // 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);