[PATCH] D118037: [DAGCombine] Consider SETULT as carry flag
    Simon Pilgrim via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Feb 18 03:37:21 PST 2022
    
    
  
RKSimon added inline comments.
================
Comment at: llvm/test/CodeGen/X86/addcarry.ll:1029
 ; CHECK-NEXT:    cmpl %ecx, %edx
-; CHECK-NEXT:    adcl $0, %eax
+; CHECK-NEXT:    adcl %esi, %eax
 ; CHECK-NEXT:    retq
----------------
craig.topper wrote:
> This case looks like an easy X86 backend peephole.
> 
> X86ISD::ADC with an unused flag result, 0 for RHS, LHS is a single use ADD. If so fold the ADD operands into a new X86ISD::ADC.
> 
> I'm not sure about the @add_U320_without_i128_add case without staring at it for a lot longer.
combineSBB already does something similar, we're just missing this from combineADC
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D118037/new/
https://reviews.llvm.org/D118037
    
    
More information about the llvm-commits
mailing list