[all-commits] [llvm/llvm-project] fbd303: [DAG] combineAndnp - fold ANDNP(x, PSHUFB(y, z)) -> ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Wed Jul 24 08:03:16 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: fbd303ba5dd98d4513d62058bc1ad463507464ce
      https://github.com/llvm/llvm-project/commit/fbd303ba5dd98d4513d62058bc1ad463507464ce
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-07-24 (Wed, 24 Jul 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/var-permute-128.ll

  Log Message:
  -----------
  [DAG] combineAndnp - fold ANDNP(x,PSHUFB(y,z)) -> PSHUFB(y,OR(z,x))

Based off #96754 - if we are zeroing out whole elements, then fold into the PSHUFB mask instead (if MSB is set the element is zero).

Allows us to replace the non-commutative ANDNP with a much simpler OR node.

Move this after ANDNP shuffle combining as that can do a better job of this for constant ANDNP + PSHUFB masks.



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