[all-commits] [llvm/llvm-project] 7d04e2: [X86] Prefer carry to overflow flag when using mul...

AZero13 via All-commits all-commits at lists.llvm.org
Mon Sep 7 19:59:30 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 7d04e28c7cee23af6a33cebdfecdaa7d43d1d4fe
      https://github.com/llvm/llvm-project/commit/7d04e28c7cee23af6a33cebdfecdaa7d43d1d4fe
  Author: AZero13 <gfunni234 at gmail.com>
  Date:   2026-09-08 (Tue, 08 Sep 2026)

  Changed paths:
    M llvm/lib/Target/X86/X86FastISel.cpp
    M llvm/lib/Target/X86/X86ISelLowering.cpp
    M llvm/test/CodeGen/X86/apx/adc.ll
    M llvm/test/CodeGen/X86/apx/flags-copy-lowering.ll
    M llvm/test/CodeGen/X86/overflow-intrinsic-setcc-fold.ll
    M llvm/test/CodeGen/X86/select-lea.ll
    M llvm/test/CodeGen/X86/smul-with-overflow.ll
    M llvm/test/CodeGen/X86/smul_fix_sat.ll
    M llvm/test/CodeGen/X86/smul_fix_sat_constants.ll
    M llvm/test/CodeGen/X86/umul-with-carry.ll
    M llvm/test/CodeGen/X86/umul-with-overflow.ll
    M llvm/test/CodeGen/X86/umul_fix_sat.ll
    M llvm/test/CodeGen/X86/umulo-128-legalisation-lowering.ll
    M llvm/test/CodeGen/X86/umulo-64-legalisation-lowering.ll
    M llvm/test/CodeGen/X86/vec_smulo.ll
    M llvm/test/CodeGen/X86/vec_umulo.ll
    M llvm/test/CodeGen/X86/xmulo.ll

  Log Message:
  -----------
  [X86] Prefer carry to overflow flag when using multiplication (#221611)

For all possible MUL/IMUL it will always output CF==OF, and CF is better
folding, so there's absolutely no reason the x86 backend should be
checking OF instead of CF for any form of multiply.

Did the change in FastISel too for consistency.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list