1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-10-19 11:02:59 +02:00

Fix check for unaligned load/store so it doesn't catch over-aligned load/store.

llvm-svn: 139649
This commit is contained in:
Eli Friedman 2011-09-13 22:19:59 +00:00
parent c592744658
commit 35cb1f9078

View File

@ -3402,7 +3402,7 @@ void SelectionDAGBuilder::visitAtomicLoad(const LoadInst &I) {
EVT VT = EVT::getEVT(I.getType()); EVT VT = EVT::getEVT(I.getType());
if (I.getAlignment() * 8 != VT.getSizeInBits()) if (I.getAlignment() * 8 < VT.getSizeInBits())
report_fatal_error("Cannot generate unaligned atomic load"); report_fatal_error("Cannot generate unaligned atomic load");
SDValue L = SDValue L =
@ -3432,7 +3432,7 @@ void SelectionDAGBuilder::visitAtomicStore(const StoreInst &I) {
EVT VT = EVT::getEVT(I.getValueOperand()->getType()); EVT VT = EVT::getEVT(I.getValueOperand()->getType());
if (I.getAlignment() * 8 != VT.getSizeInBits()) if (I.getAlignment() * 8 < VT.getSizeInBits())
report_fatal_error("Cannot generate unaligned atomic store"); report_fatal_error("Cannot generate unaligned atomic store");
if (TLI.getInsertFencesForAtomic()) if (TLI.getInsertFencesForAtomic())