[all-commits] [llvm/llvm-project] 813459: [X86] combineSelect fold 'smin' style pattern sele...

Simon Pilgrim via All-commits all-commits at lists.llvm.org
Sat Jul 30 07:32:11 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 813459ed2b0bb48b1236e2e06849b1c7526a2dfe
      https://github.com/llvm/llvm-project/commit/813459ed2b0bb48b1236e2e06849b1c7526a2dfe
  Author: Simon Pilgrim <llvm-dev at redking.me.uk>
  Date:   2022-07-30 (Sat, 30 Jul 2022)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/midpoint-int-vec-128.ll
    M llvm/test/CodeGen/X86/midpoint-int-vec-256.ll
    M llvm/test/CodeGen/X86/vselect-minmax.ll

  Log Message:
  -----------
  [X86] combineSelect fold 'smin' style pattern select(pcmpgt(RHS, LHS), LHS, RHS) -> select(pcmpgt(LHS, RHS), RHS, LHS) if pcmpgt(LHS, RHS) already exists

Avoids repeated commuted comparisons when we're performing min/max and clamp patterns




More information about the All-commits mailing list