[all-commits] [llvm/llvm-project] d4940c: [InstCombine] fix miscompile from urem/udiv transf...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri Jul 29 14:14:50 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: d4940c0f3d433ca5bab66d1e6a5170059c38a10a
      https://github.com/llvm/llvm-project/commit/d4940c0f3d433ca5bab66d1e6a5170059c38a10a
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-07-29 (Fri, 29 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/udivrem-change-width.ll

  Log Message:
  -----------
  [InstCombine] fix miscompile from urem/udiv transform with constant expression

The isa<Constant> check could misfire on an instruction with 2 constant
operands. This bug was introduced with bb789381fc11cce (D36988).

See issue #56810 for a C source example that exposed the bug.




More information about the All-commits mailing list