[all-commits] [llvm/llvm-project] eb2ac0: [Reassociate] add tests for vector negate with und...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Mon Sep 12 09:28:57 PDT 2022


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

  Changed paths:
    M llvm/test/Transforms/Reassociate/negation.ll

  Log Message:
  -----------
  [Reassociate] add tests for vector negate with undef elements; NFC

Reduced/expanded from issue #57683.


  Commit: 4ca25c66d41ab136d1587b33571d3e58cd5989f8
      https://github.com/llvm/llvm-project/commit/4ca25c66d41ab136d1587b33571d3e58cd5989f8
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-09-12 (Mon, 12 Sep 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Reassociate.cpp
    M llvm/test/Transforms/Reassociate/negation.ll

  Log Message:
  -----------
  [Reassociate] prevent partial undef negation replacement

As shown in the examples in issue #57683, we allow matching
vectors with poison (undef) in this transform (and possibly more),
but we can't then use the partially defined value as a replacement
value in other expressions blindly.

This seems to be avoided in simpler examples of reassociation,
and other passes should be able to clean up the redundant op
seen in these tests.


Compare: https://github.com/llvm/llvm-project/compare/4186a49d793e...4ca25c66d41a


More information about the All-commits mailing list