[all-commits] [llvm/llvm-project] e0ea84: [ConstantRange] Add `ushl_sat()`/`sshl_sat()` meth...

Roman Lebedev via All-commits all-commits at lists.llvm.org
Thu Nov 7 23:31:27 PST 2019


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: e0ea842baec00b6bf6dc0069f1c1961da5889927
      https://github.com/llvm/llvm-project/commit/e0ea842baec00b6bf6dc0069f1c1961da5889927
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2019-11-08 (Fri, 08 Nov 2019)

  Changed paths:
    M llvm/include/llvm/IR/ConstantRange.h
    M llvm/lib/IR/ConstantRange.cpp
    M llvm/unittests/IR/ConstantRangeTest.cpp

  Log Message:
  -----------
  [ConstantRange] Add `ushl_sat()`/`sshl_sat()` methods.

Summary:
To be used in `ConstantRange::shlWithNoOverflow()`,
may in future be useful for when saturating shift/mul ops are added.

Unlike `ConstantRange::shl()`, these are precise.

Reviewers: nikic, spatel, reames

Reviewed By: nikic

Subscribers: hiraditya, llvm-commits

Tags: #llvm

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




More information about the All-commits mailing list