[PATCH] D124677: [ConstantFold] Don't convert getelementptr to ptrtoint+inttoptr

Nuno Lopes via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 12:06:58 PDT 2022


nlopes added inline comments.


================
Comment at: llvm/lib/Analysis/ConstantFolding.cpp:879
-      Res = ConstantExpr::getSub(Res, CE->getOperand(1));
-      Res = ConstantExpr::getIntToPtr(Res, ResTy);
-      return ConstantFoldConstant(Res, DL, TLI);
----------------
tschuett wrote:
> Could you deprecate or warn on using this expression? 
It's not deprecated. It is used. It's just that it should be used as few times as possible.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D124677/new/

https://reviews.llvm.org/D124677



More information about the llvm-commits mailing list