[PATCH] D98133: [SelectionDAG] Add computeKnownBits support for ISD::USUBSAT.

Simon Pilgrim via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sun Mar 7 03:03:24 PST 2021


RKSimon accepted this revision.
RKSimon added a comment.
This revision is now accepted and ready to land.

LGTM



================
Comment at: llvm/test/CodeGen/X86/usub_sat_plus.ll:135
 ; X64-NEXT:    cmovbl %ecx, %eax
-; X64-NEXT:    andl $15, %eax
+; X64-NEXT:    movzbl %al, %eax
 ; X64-NEXT:    retq
----------------
craig.topper wrote:
> This is still less than optimal. The movzbl at line 133 is really an any_extend. The other operand of the cmovbl is 0. Had we used a zero_extend at 133 this movzbl wouldn't be needed.
Its sort of related to PR40881 - which complains about a similar thing resulting in ZEXTLOAD vs EXTLOAD.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D98133



More information about the llvm-commits mailing list