[all-commits] [llvm/llvm-project] 3ff9cc: [X86] Use CMOVNS for abs instead of CMOVGE.

Craig Topper via All-commits all-commits at lists.llvm.org
Thu Oct 14 12:28:56 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 3ff9cc01f2754a78c5c90a035dad97959946f5f3
      https://github.com/llvm/llvm-project/commit/3ff9cc01f2754a78c5c90a035dad97959946f5f3
  Author: Craig Topper <craig.topper at sifive.com>
  Date:   2021-10-14 (Thu, 14 Oct 2021)

  Changed paths:
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/abs.ll
    M llvm/test/CodeGen/X86/combine-abs.ll
    M llvm/test/CodeGen/X86/iabs.ll
    M llvm/test/CodeGen/X86/neg-abs.ll
    M llvm/test/tools/UpdateTestChecks/update_llc_test_checks/Inputs/basic.ll.expected

  Log Message:
  -----------
  [X86] Use CMOVNS for abs instead of CMOVGE.

CMOVGE reads SF and OF. CMOVNS only reads SF. This matches with
other recent changes to use a single flag where possible. It also
matches gcc codegen.

I believe this technically changes whether the conditioanl move happens
on INT_MIN, but for INT_MIN both registers are the same so it doesn't
matter.

Differential Revision: https://reviews.llvm.org/D111826




More information about the All-commits mailing list