     LLVMSetAlignment(loadInst, alignment.rawValue)
     return loadInst
   }
-
+  
+  /// Build a load instruction that loads a value from the location in the
+  /// given value.
+  ///
+  /// - parameter ptr: The pointer value to load from.
+  /// - parameter type: The type of value loaded from the given pointer.
+  /// - parameter ordering: The ordering effect of the fence for this load,
+  ///   if any.  Defaults to a nonatomic load.
+  /// - parameter volatile: Whether this is a load from a volatile memory location.
+  /// - parameter alignment: The alignment of the access.
+  /// - parameter name: The name for the newly inserted instruction.
+  ///
+  /// - returns: A value representing the result of a load from the given
+  ///   pointer value.
+  public func buildLoad(_ ptr: IRValue, type: IRType, ordering: AtomicOrdering = .notAtomic, volatile: Bool = false, alignment: Alignment = .zero, name: String = "") -> IRInstruction {
+    let loadInst = LLVMBuildLoad2(llvm, type.asLLVM(), ptr.asLLVM(), name)!
+    LLVMSetOrdering(loadInst, ordering.llvm)
+    LLVMSetVolatile(loadInst, volatile.llvm)
+    LLVMSetAlignment(loadInst, alignment.rawValue)
+    return loadInst
+  }
+  
   /// Build a `GEP` (Get Element Pointer) instruction with a resultant value
   /// that is undefined if the address is outside the actual underlying
   /// allocated object and not the address one-past-the-end.

    }
  }

  /// Build a GEP (Get Element Pointer) instruction suitable for indexing into
  /// a struct.
  ///

  ///
  /// - returns: A value representing the result of a load from the given
  ///   pointer value.
  @available(*, deprecated, message: "Use buildLoad(type:ptr:ordering:volatile:alignment:name) instead")
  public func buildLoad(_ ptr: IRValue, ordering: AtomicOrdering = .notAtomic, volatile: Bool = false, alignment: Alignment = .zero, name: String = "") -> IRInstruction {
    let loadInst = LLVMBuildLoad(llvm, ptr.asLLVM(), name)!
    LLVMSetOrdering(loadInst, ordering.llvm)
