[PATCH] D107116: [ConstantFold] Get rid of special cases for sizeof etc.

Eli Friedman via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jul 29 16:37:39 PDT 2021


efriedma created this revision.
efriedma added reviewers: mstorsjo, jdoerfert, wecing, timshen.
Herald added subscribers: ormris, dexonsmith, hiraditya.
efriedma requested review of this revision.
Herald added a subscriber: aheejin.
Herald added a project: LLVM.

Constant folding will fold these down to simple constants (or at least, expressions that don't involve a GEP).  We don't need heroics to try to optimize the form of the expression before that happens.

Fixes https://bugs.llvm.org/show_bug.cgi?id=51232 .


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D107116

Files:
  llvm/lib/IR/ConstantFold.cpp
  llvm/test/Other/constant-fold-gep.ll
  llvm/test/Transforms/LowerTypeTests/function-disjoint.ll
  llvm/test/tools/llvm-as/slow-ptrtoint.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D107116.362922.patch
Type: text/x-patch
Size: 21873 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20210729/28df6935/attachment.bin>


More information about the llvm-commits mailing list