[all-commits] [llvm/llvm-project] 535249: [NFC][InstCombine] Add test for PR49778

Roman Lebedev via All-commits all-commits at lists.llvm.org
Sun Apr 4 13:27:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 5352490ce613f1bdedaf478765b089b1f0a8be0d
      https://github.com/llvm/llvm-project/commit/5352490ce613f1bdedaf478765b089b1f0a8be0d
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-04 (Sun, 04 Apr 2021)

  Changed paths:
    A llvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-pr49778.ll

  Log Message:
  -----------
  [NFC][InstCombine] Add test for PR49778


  Commit: dceb3e599668496420d41b993100d23eeb7c0ada
      https://github.com/llvm/llvm-project/commit/dceb3e599668496420d41b993100d23eeb7c0ada
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-04 (Sun, 04 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp

  Log Message:
  -----------
  [NFC][InstCombine] Extract canTryToConstantAddTwoShiftAmounts() as helper


  Commit: 2760a808b9916a2839513b7fd7314a464f52481e
      https://github.com/llvm/llvm-project/commit/2760a808b9916a2839513b7fd7314a464f52481e
  Author: Roman Lebedev <lebedev.ri at gmail.com>
  Date:   2021-04-04 (Sun, 04 Apr 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/redundant-left-shift-input-masking-pr49778.ll

  Log Message:
  -----------
  [InstCombine] dropRedundantMaskingOfLeftShiftInput(): check that adding shift amounts doesn't overflow (PR49778)

This is identical to 781d077afb0ed9771c513d064c40170c1ccd21c9,
but for the other function.

For certain shift amount bit widths, we must first ensure that adding
shift amounts is safe, that the sum won't have an unsigned overflow.

Fixes https://bugs.llvm.org/show_bug.cgi?id=49778


Compare: https://github.com/llvm/llvm-project/compare/98d5db3e3a3f...2760a808b991


More information about the All-commits mailing list