[PATCH] D116379: [ConstantFolding] Use ICmpInst::Predicate instead of plain integer

Serge Pavlov via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Dec 29 09:25:50 PST 2021


sepavloff created this revision.
sepavloff added reviewers: nikic, spatel, kpn, craig.topper.
Herald added subscribers: dexonsmith, hiraditya.
sepavloff requested review of this revision.
Herald added a project: LLVM.

The function `ConstantFoldCompareInstruction` uses `unsigned short` to
represent compare predicate, although all usesrs of the respective
include file use definition of CmpInst also. This change replaces
predicate argument type in this function to `ICmpInst::Predicate`,
which allows to make code a bit clearer and simpler.

No functional changes.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D116379

Files:
  llvm/lib/IR/ConstantFold.cpp
  llvm/lib/IR/ConstantFold.h
  llvm/lib/IR/Constants.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D116379.396544.patch
Type: text/x-patch
Size: 17377 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211229/5f93b7c2/attachment.bin>


More information about the llvm-commits mailing list