[all-commits] [llvm/llvm-project] ef9d39: [InstCombine] add tests for shuffle with fneg oper...

Sanjay Patel via All-commits all-commits at lists.llvm.org
Fri May 6 13:30:41 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: ef9d39de2f083226a734feb743c5c280ce9d369d
      https://github.com/llvm/llvm-project/commit/ef9d39de2f083226a734feb743c5c280ce9d369d
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-05-06 (Fri, 06 May 2022)

  Changed paths:
    M llvm/test/Transforms/InstCombine/vec_shuffle.ll

  Log Message:
  -----------
  [InstCombine] add tests for shuffle with fneg operand(s); NFC

issue #45631


  Commit: b331a7ebc1e02f9939d1a4a1509e7eb6cdda3d38
      https://github.com/llvm/llvm-project/commit/b331a7ebc1e02f9939d1a4a1509e7eb6cdda3d38
  Author: Sanjay Patel <spatel at rotateright.com>
  Date:   2022-05-06 (Fri, 06 May 2022)

  Changed paths:
    M llvm/lib/Transforms/InstCombine/InstCombineVectorOps.cpp
    M llvm/test/Transforms/InstCombine/vec_shuffle-inseltpoison.ll
    M llvm/test/Transforms/InstCombine/vec_shuffle.ll

  Log Message:
  -----------
  [InstCombine] canonicalize fneg after shuffle

For the unary shuffle pattern, this is opposite to what we try
to do with binops, but it seems better to keep it consistent
with the motivating binary shuffle pattern. On that, it is
clearly better on the usual no-extra uses case.

There is a chance that this will pull an fneg away from some
other binop and cause a regression in codegen, but that should
be invertible in the backend. The transform is birectional:
https://alive2.llvm.org/ce/z/kKaKCU
https://alive2.llvm.org/ce/z/3Desfw

Fixes #45631


Compare: https://github.com/llvm/llvm-project/compare/042bd21cf9f4...b331a7ebc1e0


More information about the All-commits mailing list