diff options
author | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-11-18 04:55:08 -0600 |
---|---|---|
committer | Youngsuk Kim <youngsuk.kim@hpe.com> | 2023-11-18 04:55:11 -0600 |
commit | bda785a3e2c02fc5006023b5f304edd3e3bb771a (patch) | |
tree | 59cb06928ae3389303450212ea2f6ffe4af25147 | |
parent | b4db24e33008660d11d703c19d8affaf5f9a843e (diff) | |
download | llvm-bda785a3e2c02fc5006023b5f304edd3e3bb771a.zip llvm-bda785a3e2c02fc5006023b5f304edd3e3bb771a.tar.gz llvm-bda785a3e2c02fc5006023b5f304edd3e3bb771a.tar.bz2 |
[llvm][RelLookupTableConverter] Remove no-op ptr-to-ptr bitcast (NFC)
Opaque ptr cleanup effort (NFC).
-rw-r--r-- | llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp b/llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp index c9ff94d..1666535 100644 --- a/llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp +++ b/llvm/lib/Transforms/Utils/RelLookupTableConverter.cpp @@ -153,11 +153,10 @@ static void convertToRelLookupTable(GlobalVariable &LookupTable) { Builder.SetInsertPoint(Load); Function *LoadRelIntrinsic = llvm::Intrinsic::getDeclaration( &M, Intrinsic::load_relative, {Index->getType()}); - Value *Base = Builder.CreateBitCast(RelLookupTable, Builder.getInt8PtrTy()); // Create a call to load.relative intrinsic that computes the target address // by adding base address (lookup table address) and relative offset. - Value *Result = Builder.CreateCall(LoadRelIntrinsic, {Base, Offset}, + Value *Result = Builder.CreateCall(LoadRelIntrinsic, {RelLookupTable, Offset}, "reltable.intrinsic"); // Create a bitcast instruction if necessary. |