[llvm] Add 3 way compare <=> integer intrinsics to Langref (PR #83227)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 11 04:53:41 PDT 2024


================
@@ -5235,6 +5235,25 @@ void Verifier::visitIntrinsicCall(Intrinsic::ID ID, CallBase &Call) {
     }
     break;
   }
+  case Intrinsic::ucmp:
+  case Intrinsic::scmp: {
+
+    Type *SrcTy = Call.getOperand(0)->getType();
+    Type *DestTy = Call.getType();
+
+    Check(SrcTy->isIntOrIntVectorTy(), "[u]scmp only operates on integers", Call);
+    Check(DestTy->isIntOrIntVectorTy(), "[u]scmp only produces integers", Call);
----------------
nikic wrote:

These two checks are unnecessary, as they are enforced by Intrinsics.td.

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


More information about the llvm-commits mailing list