[all-commits] [llvm/llvm-project] 0f7906: [mlir][intrange] Fix `arith.shl` inference in case...

Felix Schneider via All-commits all-commits at lists.llvm.org
Mon May 13 10:28:00 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 0f7906645d18a38a6b80a1e8e1d425396f6ab353
      https://github.com/llvm/llvm-project/commit/0f7906645d18a38a6b80a1e8e1d425396f6ab353
  Author: Felix Schneider <fx.schn at gmail.com>
  Date:   2024-05-13 (Mon, 13 May 2024)

  Changed paths:
    M mlir/lib/Interfaces/Utils/InferIntRangeCommon.cpp
    M mlir/test/Dialect/Arith/int-range-opts.mlir

  Log Message:
  -----------
  [mlir][intrange] Fix `arith.shl` inference in case of overflow (#91737)

When an overflow happens during shift left, i.e. the last sign bit or
the most significant data bit gets shifted out, the current approach of
inferring the range of results does not work anymore.

This patch checks for possible overflow and returns the max range in
that case.

Fix https://github.com/llvm/llvm-project/issues/82158



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list