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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Sat Mar 6 18:42:51 PST 2021


craig.topper added inline comments.


================
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
----------------
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.


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