[all-commits] [llvm/llvm-project] 7b993d: [InstCombine] Use sadd.sat for chained ldexp fold ...

Justin Lebar via All-commits all-commits at lists.llvm.org
Wed May 27 09:08:50 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7b993d207fee1e2160cbd20469f3cce73f27fce9
      https://github.com/llvm/llvm-project/commit/7b993d207fee1e2160cbd20469f3cce73f27fce9
  Author: Justin Lebar <justin.lebar at gmail.com>
  Date:   2026-05-27 (Wed, 27 May 2026)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineCalls.cpp
    M llvm/test/Transforms/InstCombine/ldexp.ll

  Log Message:
  -----------
  [InstCombine] Use sadd.sat for chained ldexp fold (#199274)

ldexp(ldexp(x, a), b) -> ldexp(x, a + b) didn't consider the fact that
`a + b` may overflow!  Use a saturating add instead.

This bug was found by a large run of Opus 4.7 looking for bugs in LLVM.



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