[llvm] [ValueTracking] Improve KnownBits for signed min-max clamping (PR #120576)
Yingwei Zheng via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 06:35:25 PST 2024
================
@@ -0,0 +1,174 @@
+; RUN: opt < %s -passes=aggressive-instcombine -mtriple=x86_64 -S | FileCheck %s
+
+; This LIT test checks if TruncInstCombine pass correctly recognizes the
+; constraints from a signed min-max clamp. The clamp is a sequence of smin and
+; smax instructions limiting a variable into a range, smin <= x <= smax.
+
+declare i16 @llvm.smin.i16(i16, i16)
----------------
dtcxzyw wrote:
Declaration of intrinsics is unnecessary.
https://github.com/llvm/llvm-project/pull/120576
More information about the llvm-commits
mailing list