From 6bd5e286cfae3de60ffc7ac6091d04b246f4e198 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci[bot]" <66853113+pre-commit-ci[bot]@users.noreply.github.com> Date: Mon, 6 Jun 2022 09:53:37 +0000 Subject: [PATCH] [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --- taichi/codegen/codegen_llvm.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/taichi/codegen/codegen_llvm.cpp b/taichi/codegen/codegen_llvm.cpp index 7f76194fd4891..e18a76591a260 100644 --- a/taichi/codegen/codegen_llvm.cpp +++ b/taichi/codegen/codegen_llvm.cpp @@ -1541,16 +1541,17 @@ llvm::Value *CodeGenLLVM::offset_bit_ptr(llvm::Value *input_bit_ptr, return create_bit_ptr_struct(byte_ptr_base, new_bit_offset); } -std::tuple CodeGenLLVM::load_bit_pointer(llvm::Value *ptr) { +std::tuple CodeGenLLVM::load_bit_pointer( + llvm::Value *ptr) { // 1. load byte pointer - auto byte_ptr_in_bit_struct = builder->CreateGEP( - ptr, {tlctx->get_constant(0), tlctx->get_constant(0)}); + auto byte_ptr_in_bit_struct = + builder->CreateGEP(ptr, {tlctx->get_constant(0), tlctx->get_constant(0)}); auto byte_ptr = builder->CreateLoad(byte_ptr_in_bit_struct); TI_ASSERT(byte_ptr->getType()->getPointerElementType()->isIntegerTy(8)); // 2. load bit offset - auto bit_offset_in_bit_struct = builder->CreateGEP( - ptr, {tlctx->get_constant(0), tlctx->get_constant(1)}); + auto bit_offset_in_bit_struct = + builder->CreateGEP(ptr, {tlctx->get_constant(0), tlctx->get_constant(1)}); auto bit_offset = builder->CreateLoad(bit_offset_in_bit_struct); TI_ASSERT(bit_offset->getType()->isIntegerTy(32)); return std::make_tuple(byte_ptr, bit_offset);