Index: llvm/include/llvm/Support/Alignment.h
===================================================================
--- llvm/include/llvm/Support/Alignment.h
+++ llvm/include/llvm/Support/Alignment.h
@@ -143,7 +143,7 @@
 
 /// Checks that SizeInBytes is a multiple of the alignment.
 inline bool isAligned(Align Lhs, uint64_t SizeInBytes) {
-  return SizeInBytes % Lhs.value() == 0;
+  return !(SizeInBytes & (Lhs.value() - 1));
 }
 
 /// Checks that Addr is a multiple of the alignment.