[llvm] [GlobalIsel] Add G_SCMP and G_UCMP instructions (PR #98894)
Michael Maitland via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 15 06:34:25 PDT 2024
================
@@ -1273,6 +1273,34 @@ class MachineIRBuilder {
const SrcOp &Op0, const SrcOp &Op1,
std::optional<unsigned> Flags = std::nullopt);
+ /// Build and insert a \p Res = G_SCMP \p Op0, \p Op1
+ ///
+ /// \pre setBasicBlock or setMI must have been called.
+
+ /// \pre \p Res must be a generic virtual register with scalar or
+ /// vector type. Typically this starts as s2 or <N x s2>.
+ /// \pre \p Op0 and Op1 must be generic virtual registers with the
+ /// same number of elements as \p Res. If \p Res is a scalar,
+ /// \p Op0 must be a scalar.
----------------
michaelmaitland wrote:
If Res is a scalar, does Op0 and Op1 need to have the same bitwidth?
https://github.com/llvm/llvm-project/pull/98894
More information about the llvm-commits
mailing list