[all-commits] [llvm/llvm-project] 5a14ed: [InstCombine] Ensure shifts are in range for (X <<...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Sep 25 05:02:11 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5a14edd8edb4d560e8a6420fffb490498baee0cf
      https://github.com/llvm/llvm-project/commit/5a14edd8edb4d560e8a6420fffb490498baee0cf
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2021-09-25 (Sat, 25 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineMulDivRem.cpp
    M llvm/test/Transforms/InstCombine/shift.ll

  Log Message:
  -----------
  [InstCombine] Ensure shifts are in range for (X << C1) / C2 -> X fold.

We can get here before out of range shift amounts have been handled - limit to BW-2 for sdiv and BW-1 for udiv

Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=38078




More information about the All-commits mailing list