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

Thorsten via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Apr 29 12:04:04 PDT 2022


tschuett 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);
----------------
Could you deprecate or warn on using this expression? 


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

https://reviews.llvm.org/D124677



More information about the llvm-commits mailing list