[all-commits] [llvm/llvm-project] c11ea4: [ValueTracking] Add `matchSimpleBinaryIntrinsicRec...

Antonio Frighetto via All-commits all-commits at lists.llvm.org
Fri Jun 27 10:08:01 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: c11ea449e59cfbd10b7ba2ed11a049ca5184164a
      https://github.com/llvm/llvm-project/commit/c11ea449e59cfbd10b7ba2ed11a049ca5184164a
  Author: Antonio Frighetto <me at antoniofrighetto.com>
  Date:   2025-06-27 (Fri, 27 Jun 2025)

  Changed paths:
    M llvm/include/llvm/Analysis/ValueTracking.h
    M llvm/lib/Analysis/ValueTracking.cpp
    M llvm/unittests/Analysis/ValueTrackingTest.cpp

  Log Message:
  -----------
  [ValueTracking] Add `matchSimpleBinaryIntrinsicRecurrence` helper

Similarly to what it is being done to match simple recurrence cycle
relations, attempt to match value-accumulating recurrences of kind:
```
  %umax.acc = phi i8 [ %umax, %backedge ], [ %a, %entry ]
  %umax = call i8 @llvm.umax.i8(i8 %umax.acc, i8 %b)
```
Preliminary work to let InstCombine avoid folding such recurrences,
so that simple loop-invariant computation may get hoisted. Minor
opportunity to refactor out code as well.



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