[llvm] Reapply "[LICM] Fold associative binary ops to promote code hoisting (#81608)" (PR #100377)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 25 05:59:04 PDT 2024
================
@@ -0,0 +1,229 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
+; RUN: opt -S -passes=licm < %s | FileCheck %s
+
+; Fold ADD and remove old op if unused.
+; https://alive2.llvm.org/ce/z/wAY-Nd
+define void @add_one_use(i64 %c) {
----------------
nikic wrote:
Prefer using two different `%c1` and `%c2`, as the transform isn't limited to equal operands.
https://github.com/llvm/llvm-project/pull/100377
More information about the llvm-commits
mailing list