[all-commits] [llvm/llvm-project] a73973: [InstCombine] add test for shift-trunc-shift with ...

RotateRight via All-commits all-commits at lists.llvm.org
Mon Sep 6 08:29:37 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: a73973c9d4616679569010d800f89be650dafcb7
      https://github.com/llvm/llvm-project/commit/a73973c9d4616679569010d800f89be650dafcb7
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

  Changed paths:
    M llvm/test/Transforms/InstCombine/shift-amount-reassociation-with-truncation-shl.ll

  Log Message:
  -----------
  [InstCombine] add test for shift-trunc-shift with extra uses; NFC

The transform doesn't check for extra uses, so we
have more instructions than we started with.


  Commit: 982a15cb3fa0ea06fc7d24ebf56249cff06e268b
      https://github.com/llvm/llvm-project/commit/982a15cb3fa0ea06fc7d24ebf56249cff06e268b
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

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

  Log Message:
  -----------
  [InstCombine] early exit to reduce indentation; NFC


  Commit: fbb78668f2ee4a7ce390d9a5749168c5be26874e
      https://github.com/llvm/llvm-project/commit/fbb78668f2ee4a7ce390d9a5749168c5be26874e
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/shift-amount-reassociation-with-truncation-shl.ll

  Log Message:
  -----------
  [InstCombine] fix one-use condition for shift transform

This transform is written in a confusing style,
and I suspect it is at fault for a more serious
bug noted in PR51567.

But it's been around forever, so I'm making the
minimal change to fix another bug - it could
increase instructions because it was not checking
uses.


  Commit: c85f450619f74c9befc519b748d0cf0649f07518
      https://github.com/llvm/llvm-project/commit/c85f450619f74c9befc519b748d0cf0649f07518
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

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

  Log Message:
  -----------
  [InstCombine] refactor to reduce indent; NFC

This transform should be updated to use better
variable names and code comments. It could
also create the shift-of-shift directly instead
of relying on another combine for that.


  Commit: 0d83e7203479d6bc7368d5b94351e4907c2afafc
      https://github.com/llvm/llvm-project/commit/0d83e7203479d6bc7368d5b94351e4907c2afafc
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2021-09-06 (Mon, 06 Sep 2021)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineShifts.cpp
    M llvm/test/Transforms/InstCombine/shift-amount-reassociation-with-truncation-shl.ll

  Log Message:
  -----------
  [InstCombine] fix infinite loop from shift transform

I'm not sure if there is a better way or another bug
still here, but this is enough to avoid the loop from:
https://llvm.org/PR51657

The test requires multiple blocks and datalayout to
trigger the problem path.


Compare: https://github.com/llvm/llvm-project/compare/dc453dcf760e...0d83e7203479


More information about the All-commits mailing list