[all-commits] [llvm/llvm-project] dd5c53: [InstCombine] Add tests for invert of lshr (NFC)

Nikita Popov via All-commits all-commits at lists.llvm.org
Fri Dec 1 06:55:46 PST 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: dd5c5349e1f3b495789a9f67e579121da3722db6
      https://github.com/llvm/llvm-project/commit/dd5c5349e1f3b495789a9f67e579121da3722db6
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M llvm/test/Transforms/InstCombine/free-inversion.ll

  Log Message:
  -----------
  [InstCombine] Add tests for invert of lshr (NFC)


  Commit: b92693ac6afc522ea56bede0b9805ca7c138754c
      https://github.com/llvm/llvm-project/commit/b92693ac6afc522ea56bede0b9805ca7c138754c
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-12-01 (Fri, 01 Dec 2023)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstructionCombining.cpp
    M llvm/test/Transforms/InstCombine/free-inversion.ll

  Log Message:
  -----------
  [InstCombine] Support inverting lshr with non-negative operand

If the lshr operand is non-negative, we can treat it the same
way as an ashr. Ideally we would represent this as "lshr nneg",
but for now just perform the necessary ValueTracking query.

Proof: https://alive2.llvm.org/ce/z/Ahg4ri


Compare: https://github.com/llvm/llvm-project/compare/65aab9e72220...b92693ac6afc


More information about the All-commits mailing list