[llvm] [LoopPeel] Support min/max intrinsics in loop peeling (PR #93162)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Wed May 29 03:51:44 PDT 2024


================
@@ -0,0 +1,328 @@
+; NOTE: Assertions have been autogenerated by utils/update_test_checks.py UTC_ARGS: --version 4
+; RUN: opt < %s -S -passes=loop-unroll -unroll-peel-max-count=2 | FileCheck %s
+
+declare void @foo(i32)
+
+declare i32 @llvm.smin.i32(i32, i32)
+declare i32 @llvm.smax.i32(i32, i32)
+declare i32 @llvm.umin.i32(i32, i32)
+declare i32 @llvm.umax.i32(i32, i32)
+
+declare void @bar(i8)
+
+declare i8 @llvm.umin.i8(i8, i8)
----------------
nikic wrote:

```suggestion
declare void @foo(i32)
declare void @bar(i8)
```
Intrinsic declarations are no longer needed.

https://github.com/llvm/llvm-project/pull/93162


More information about the llvm-commits mailing list