[PATCH] D156739: Drop some typed pointer handling
Nikita Popov via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 1 00:53:59 PDT 2023
nikic added inline comments.
================
Comment at: llvm/lib/Analysis/InstructionSimplify.cpp:6050
Constant *C = ConstantExpr::getGetElementPtr(
- Int32Ty, ConstantExpr::getBitCast(Ptr, Int32PtrTy),
- ConstantInt::get(Int64Ty, OffsetInt / 4));
+ Int32Ty, Ptr, ConstantInt::get(Int64Ty, OffsetInt / 4));
Constant *Loaded = ConstantFoldLoadFromConstPtr(C, Int32Ty, DL);
----------------
Side-note: ConstantFoldLoadFromConstPtr() has an overload that accepts the offset as an APInt. That would be a bit nicer than creating a GEP here.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D156739/new/
https://reviews.llvm.org/D156739
More information about the llvm-commits
mailing list