pub unsafe fn gen_vat(
        &mut self,
        builder: LLVMBuilderRef,
        vector: LLVMValueRef,
        index: LLVMValueRef,
    ) -> WeldResult<LLVMValueRef> {
        if self.vat.is_none() {
            let mut arg_tys = [self.vector_ty, self.i64_type()];
            let ret_ty = LLVMPointerType(LLVMVectorType(self.elem_ty, LLVM_VECTOR_WIDTH), 0);

            let name = format!("{}.vat", self.name);
            let (function, builder, _) = self.define_function(ret_ty, &mut arg_tys, name);

            LLVMExtAddAttrsOnFunction(self.context, function, &[AlwaysInline]);

            let vector = LLVMGetParam(function, 0);
            let index = LLVMGetParam(function, 1);
            let pointer = LLVMBuildExtractValue(builder, vector, 0, c_str!(""));
            let value_pointer = LLVMBuildGEP(builder, pointer, [index].as_mut_ptr(), 1, c_str!(""));
            let value_pointer = LLVMBuildBitCast(builder, value_pointer, ret_ty, c_str!(""));
            LLVMBuildRet(builder, value_pointer);

            self.vat = Some(function);
            LLVMDisposeBuilder(builder);
        }

        let mut args = [vector, index];
        Ok(LLVMBuildCall(
            builder,
            self.vat.unwrap(),
            args.as_mut_ptr(),
            args.len() as u32,
            c_str!(""),
        ))
    }
Generates the `vat` method on vectors and calls it.

This method performs an index computation into the vector.  The function returns a SIMD pointer
to the requested index: it does not dereference the pointer. The generated method does not perform
any bounds checking.
weld/src/codegen/llvm2/vector.rs