[PATCH] D111826: [X86] Use CMOVNS for abs instead of CMOVGE.

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 14 11:27:12 PDT 2021


craig.topper created this revision.
craig.topper added reviewers: RKSimon, spatel, lebedev.ri, pengfei.
Herald added subscribers: hiraditya, arichardson.
craig.topper requested review of this revision.
Herald added a project: LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D111826

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D111826.379790.patch
Type: text/x-patch
Size: 11831 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20211014/a39e3323/attachment-0001.bin>


More information about the llvm-commits mailing list