[all-commits] [llvm/llvm-project] 6df129: [X86] LowerSELECTWithCmpZero - extend branchless O...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Sep 7 03:25:09 PDT 2024


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 6df12912964caf118c0c8019d7ec681e6ad8bf5c
      https://github.com/llvm/llvm-project/commit/6df12912964caf118c0c8019d7ec681e6ad8bf5c
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-09-07 (Sat, 07 Sep 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/pull-conditional-binop-through-shift.ll
    M llvm/test/CodeGen/X86/select.ll

  Log Message:
  -----------
  [X86] LowerSELECTWithCmpZero - extend branchless OR/XOR select codegen to handle ADD/SUB as well (#107612)

Extend the "SELECT ((AND X, 1) != 0), Y, (OR/XOR Y, Z) -> (OR/XOR Y, (AND (NEG(AND X, 1)), Z))" to also handle ADD/SUB.

As SUB is not commutative, we have to be more careful and only accept LHS matches.



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