[all-commits] [llvm/llvm-project] 64902e: [DAG] Don't constant fold opaque constants in visi...

Philip Reames via All-commits all-commits at lists.llvm.org
Fri Sep 18 07:53:34 PDT 2026


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 64902e09805506f786496030c5307e1a630cfbca
      https://github.com/llvm/llvm-project/commit/64902e09805506f786496030c5307e1a630cfbca
  Author: Philip Reames <listmail at philipreames.com>
  Date:   2026-09-18 (Fri, 18 Sep 2026)

  Changed paths:
    M llvm/lib/CodeGen/SelectionDAG/DAGCombiner.cpp
    M llvm/test/CodeGen/X86/combine-mulo.ll

  Log Message:
  -----------
  [DAG] Don't constant fold opaque constants in visitMULO (#224494)

Opaque constants (created for constants hoisted by ConstantHoisting) are
deliberately not folded by FoldConstantArithmetic for binary operations,
so that the hoisted constant is not rematerialized in each user. The MULO
fold in DAGCombiner did not check for this. 

The second test reveals a second opaque constant problem - apparently
our constant RHS canonicalization isn't properly handling opaque
constants. (This change is about three split attempts off of something that
was supposed to be fairly trivial. I decided to stop here.)

Assisted-by: Claude Fable 5.1



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