[mlir][ByteCodeReader] Fix bugs in EncodingReader::alignTo

It seems that the number of padding value should be computed based on
the offset of the current pointer to the bytecode buffer
begin (instead of the absolute address of `ptr`). Otherwise, the
skipped padding value will be dependent on the alignment of
`buffer.begin()`?
diff --git a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
index 1052946..793170d 100644
--- a/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
+++ b/mlir/lib/Bytecode/Reader/BytecodeReader.cpp
@@ -107,7 +107,8 @@
       return emitError("expected alignment to be a power-of-two");
 
     auto isUnaligned = [&](const uint8_t *ptr) {
-      return ((uintptr_t)ptr & (alignment - 1)) != 0;
+      unsigned offset = ptr - buffer.begin();
+      return (offset & (alignment - 1)) != 0;
     };
 
     // Shift the reader position to the next alignment boundary.
@@ -1506,7 +1507,7 @@
     UseListOrderStorage(bool isIndexPairEncoding,
                         SmallVector<unsigned, 4> &&indices)
         : indices(std::move(indices)),
-          isIndexPairEncoding(isIndexPairEncoding){};
+          isIndexPairEncoding(isIndexPairEncoding) {};
     /// The vector containing the information required to reorder the
     /// use-list of a value.
     SmallVector<unsigned, 4> indices;