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



git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139649 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
index 4c58fe9..9d86c75 100644
--- a/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
+++ b/lib/CodeGen/SelectionDAG/SelectionDAGBuilder.cpp
@@ -3402,7 +3402,7 @@
 
   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");
 
   SDValue L =
@@ -3432,7 +3432,7 @@
 
   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");
 
   if (TLI.getInsertFencesForAtomic())