[all-commits] [llvm/llvm-project] 127ed9: [PowerPC] Use zext instead of anyext in custom and...

Nikita Popov via All-commits all-commits at lists.llvm.org
Thu Oct 12 00:32:33 PDT 2023


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 127ed9ae266ead58aa525f74f4c86841f6674793
      https://github.com/llvm/llvm-project/commit/127ed9ae266ead58aa525f74f4c86841f6674793
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2023-10-12 (Thu, 12 Oct 2023)

  Changed paths:
    M llvm/lib/Target/PowerPC/PPCISelLowering.cpp
    M llvm/test/CodeGen/PowerPC/and-extend-combine.ll

  Log Message:
  -----------
  [PowerPC] Use zext instead of anyext in custom and combine (#68784)

This custom combine currently converts `and(anyext(x),c)` into
`anyext(and(x,c))`. This is not correct, because the original expression
guaranteed that the high bits are zero, while the new one sets them to
undef.

Emit `zext(and(x,c))` instead.

Fixes https://github.com/llvm/llvm-project/issues/68783.




More information about the All-commits mailing list