[llvm] [ConstraintElim] Decompose sext-like insts for signed predicates (PR #82344)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Tue Feb 20 03:53:22 PST 2024


================
@@ -507,6 +507,13 @@ static Decomposition decompose(Value *V,
     }
     Value *Op0;
     Value *Op1;
+
+    if (match(V, m_SExt(m_Value(Op0))))
+      return Op0;
----------------
nikic wrote:

The equivalent unsigned code only strips the zext, but still falls through to the following code. Should we be doing that here as well? That would allow decomposing something like `sext(add nsw)`.

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


More information about the llvm-commits mailing list