[all-commits] [llvm/llvm-project] 058964: [X86] LowerSELECTWithCmpZero - move "select (X != ...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sun Sep 8 05:35:22 PDT 2024


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

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/cmov-promotion.ll

  Log Message:
  -----------
  [X86] LowerSELECTWithCmpZero - move "select (X != 0), -1, Y --> 0 - X; or (sbb), Y" fold

Move fold into LowerSELECTWithCmpZero so it can be used with (AND X,1) ==/!= 0 select cases


  Commit: ffeef7599af94694191458a0e2a131e122181a13
      https://github.com/llvm/llvm-project/commit/ffeef7599af94694191458a0e2a131e122181a13
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-09-08 (Sun, 08 Sep 2024)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/cmov-promotion.ll
    M llvm/test/CodeGen/X86/select.ll
    M llvm/test/CodeGen/X86/select_const.ll

  Log Message:
  -----------
  [X86] LowerSELECTWithCmpZero - without CMOV, fold "SELECT (AND(X,1) == 0), C1, C2 -> XOR(C1,AND(NEG(AND(X,1)),XOR(C1,C2))"

Use xor-bitselect pattern to avoid branching when selecting between 2 constants


  Commit: 97e6f92d3181f1bb22e848b23eac801ab5d63575
      https://github.com/llvm/llvm-project/commit/97e6f92d3181f1bb22e848b23eac801ab5d63575
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2024-09-08 (Sun, 08 Sep 2024)

  Changed paths:
    M llvm/lib/Transforms/Vectorize/LoopVectorize.cpp

  Log Message:
  -----------
  Fix GCC Wparentheses warning. NFC.


Compare: https://github.com/llvm/llvm-project/compare/78fa41524b6f...97e6f92d3181

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