[PATCH] D128820: [ConstExpr] Don't create div/rem expressions

Nikita Popov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jun 29 07:01:19 PDT 2022


nikic created this revision.
nikic added reviewers: reames, nhaehnle.
Herald added a subscriber: hiraditya.
Herald added a project: All.
nikic requested review of this revision.
Herald added a project: LLVM.
Herald added a subscriber: llvm-commits.

This removes creation of udiv/sdiv/urem/srem constant expressions in a few places, in preparation for their removal. This only covers the cases where we're explicitly creating these expression types -- we also have quite a few uses of `ConstantExpr::get()` that could potentially be creating them and will need additional review.


https://reviews.llvm.org/D128820

Files:
  llvm/include/llvm/Analysis/TargetFolder.h
  llvm/include/llvm/IR/ConstantFolder.h
  llvm/lib/Analysis/ScalarEvolution.cpp
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D128820.440993.patch
Type: text/x-patch
Size: 5866 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220629/069ddc23/attachment.bin>


More information about the llvm-commits mailing list