summaryrefslogtreecommitdiffstats
path: root/llvm/lib
diff options
context:
space:
mode:
authorPete Cooper <peter_cooper@apple.com>2015-07-15 00:07:57 +0000
committerPete Cooper <peter_cooper@apple.com>2015-07-15 00:07:57 +0000
commite46f7ef385950cfc9f5b910c4dded6a0315a748d (patch)
tree7cee492506c938923c433443ec7aef8b744e16c2 /llvm/lib
parent7e747d26c5434e2e6526fccf22a8931ca02aa387 (diff)
downloadbcm5719-llvm-e46f7ef385950cfc9f5b910c4dded6a0315a748d.tar.gz
bcm5719-llvm-e46f7ef385950cfc9f5b910c4dded6a0315a748d.zip
Change conditional to assert. NFC.
This code was breaking from the case statement if the getStoreSizeInBits() value was not a multiple of 0. Given that the implementation returns getStoreSize() * 8, it can only be a multiple of 8. llvm-svn: 242255
Diffstat (limited to 'llvm/lib')
-rw-r--r--llvm/lib/Target/XCore/XCoreISelLowering.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/llvm/lib/Target/XCore/XCoreISelLowering.cpp b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
index d62e7428299..032df42cd9e 100644
--- a/llvm/lib/Target/XCore/XCoreISelLowering.cpp
+++ b/llvm/lib/Target/XCore/XCoreISelLowering.cpp
@@ -1828,9 +1828,8 @@ SDValue XCoreTargetLowering::PerformDAGCombine(SDNode *N,
SDValue Chain = ST->getChain();
unsigned StoreBits = ST->getMemoryVT().getStoreSizeInBits();
- if (StoreBits % 8) {
- break;
- }
+ assert((StoreBits % 8) == 0 &&
+ "Store size in bits must be a multiple of 8");
unsigned ABIAlignment = DAG.getDataLayout().getABITypeAlignment(
ST->getMemoryVT().getTypeForEVT(*DCI.DAG.getContext()));
unsigned Alignment = ST->getAlignment();
OpenPOWER on IntegriCloud