[all-commits] [llvm/llvm-project] 93cbda: [Reassociate] Avoid ConstantExpr::get()

Nikita Popov via All-commits all-commits at lists.llvm.org
Mon Jul 4 06:18:45 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 93cbdaef0455f81ea6355f11b3d1653fae7ba05a
      https://github.com/llvm/llvm-project/commit/93cbdaef0455f81ea6355f11b3d1653fae7ba05a
  Author: Nikita Popov <npopov at redhat.com>
  Date:   2022-07-04 (Mon, 04 Jul 2022)

  Changed paths:
    M llvm/lib/Transforms/Scalar/Reassociate.cpp

  Log Message:
  -----------
  [Reassociate] Avoid ConstantExpr::get()

Use ConstantFoldBinaryOpOperands() instead, to handle the case
where not all binary ops have a constant expression variant.

This is a bit awkward because we only want to pop the element from
Ops once we're sure that it has folded.




More information about the All-commits mailing list