[llvm] [IR] Add `samesign` flag to icmp instruction (PR #111419)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sun Oct 13 12:02:20 PDT 2024
================
@@ -1224,6 +1224,17 @@ class ICmpInst: public CmpInst {
/// Return the unsigned version of the predicate.
static Predicate getUnsignedPredicate(Predicate pred);
+ /// An icmp instruction, which can be marked as "samesign", indicating that
+ /// the two operands have the same sign. This means that we can convert
+ /// "slt/ult" to "ult", which enables more optimizations.
+ enum { SameSign = (1 << 0) };
----------------
nikic wrote:
This should be private.
https://github.com/llvm/llvm-project/pull/111419
More information about the llvm-commits
mailing list