diff options
author | Bill Wendling <isanbard@gmail.com> | 2009-08-15 21:21:19 +0000 |
---|---|---|
committer | Bill Wendling <isanbard@gmail.com> | 2009-08-15 21:21:19 +0000 |
commit | af5663405834ca7cf4a847f2efa2d624ce99b1d8 (patch) | |
tree | 59a385a44947be3842b79aed92457f36aa45bd98 /lib/Target/XCore | |
parent | f865ea85bd9d3e04aa795ee03cfc8db339f8c9b9 (diff) | |
download | external_llvm-af5663405834ca7cf4a847f2efa2d624ce99b1d8.zip external_llvm-af5663405834ca7cf4a847f2efa2d624ce99b1d8.tar.gz external_llvm-af5663405834ca7cf4a847f2efa2d624ce99b1d8.tar.bz2 |
Reapply r79127. It was fixed by d0k.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79136 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Target/XCore')
-rw-r--r-- | lib/Target/XCore/XCoreISelLowering.cpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/Target/XCore/XCoreISelLowering.cpp b/lib/Target/XCore/XCoreISelLowering.cpp index 0174778..605ed83 100644 --- a/lib/Target/XCore/XCoreISelLowering.cpp +++ b/lib/Target/XCore/XCoreISelLowering.cpp @@ -367,9 +367,10 @@ SDValue XCoreTargetLowering:: LowerLOAD(SDValue Op, SelectionDAG &DAG) { LoadSDNode *LD = cast<LoadSDNode>(Op); - assert(LD->getExtensionType() == ISD::NON_EXTLOAD && "Unexpected extension type"); + assert(LD->getExtensionType() == ISD::NON_EXTLOAD && + "Unexpected extension type"); assert(LD->getMemoryVT() == MVT::i32 && "Unexpected load EVT"); - if (allowsUnalignedMemoryAccesses()) { + if (allowsUnalignedMemoryAccesses(LD->getMemoryVT())) { return SDValue(); } unsigned ABIAlignment = getTargetData()-> @@ -465,7 +466,7 @@ LowerSTORE(SDValue Op, SelectionDAG &DAG) StoreSDNode *ST = cast<StoreSDNode>(Op); assert(!ST->isTruncatingStore() && "Unexpected store type"); assert(ST->getMemoryVT() == MVT::i32 && "Unexpected store EVT"); - if (allowsUnalignedMemoryAccesses()) { + if (allowsUnalignedMemoryAccesses(ST->getMemoryVT())) { return SDValue(); } unsigned ABIAlignment = getTargetData()-> @@ -1048,7 +1049,8 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N, case ISD::STORE: { // Replace unaligned store of unaligned load with memmove. StoreSDNode *ST = cast<StoreSDNode>(N); - if (!DCI.isBeforeLegalize() || allowsUnalignedMemoryAccesses() || + if (!DCI.isBeforeLegalize() || + allowsUnalignedMemoryAccesses(ST->getMemoryVT()) || ST->isVolatile() || ST->isIndexed()) { break; } |