[PATCH] D144451: [X86] Optimize umax(X,1)

Noah Goldstein via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 21 09:22:59 PST 2023


goldstein.w.n added a comment.

Slightly unrelated, is it possible to get the codegen to be:

  	xorl	%eax, %eax
  	cmp	$0x1, %edi
  	adc	%edi, %eax

?

If so that would be preferable (except in register pressure corner case b.c `eax` and `edi` now have slight live-range overlap).
On target like ICX it saves a full instruction b.c no move-elim.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D144451/new/

https://reviews.llvm.org/D144451



More information about the llvm-commits mailing list