[all-commits] [llvm/llvm-project] ecfd91: [ConstantFolding] Use ICmpInst::Predicate instead ...

Serge Pavlov via All-commits all-commits at lists.llvm.org
Thu Dec 30 00:09:56 PST 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ecfd9196d5dde5699d7fe3bd411949a56e01bd8c
      https://github.com/llvm/llvm-project/commit/ecfd9196d5dde5699d7fe3bd411949a56e01bd8c
  Author: Serge Pavlov <sepavloff at gmail.com>
  Date:   2021-12-30 (Thu, 30 Dec 2021)

  Changed paths:
    M llvm/lib/IR/ConstantFold.cpp
    M llvm/lib/IR/ConstantFold.h
    M llvm/lib/IR/Constants.cpp

  Log Message:
  -----------
  [ConstantFolding] Use ICmpInst::Predicate instead of plain integer

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.

Differential Revision: https://reviews.llvm.org/D116379




More information about the All-commits mailing list