[all-commits] [llvm/llvm-project] da709f: [X86] combinePTESTCC - fold PTESTZ(X, SIGNMASK) -> ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Thu Oct 30 06:17:34 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: da709f5b781680a8d0534ea8aedff6d0b9a7c04e
      https://github.com/llvm/llvm-project/commit/da709f5b781680a8d0534ea8aedff6d0b9a7c04e
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2025-10-30 (Thu, 30 Oct 2025)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/vector-reduce-or-cmp.ll

  Log Message:
  -----------
  [X86] combinePTESTCC - fold PTESTZ(X,SIGNMASK) -> VTESTPD/PSZ(X,X) on AVX targets (#165676)

If the PTEST is just using the ZF result and one of the operands is a
i32/i64 sign mask we can use the TESTPD/PS instructions instead and
avoid the use of an extra constant.

Fixes some codegen identified in #156233



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list