[llvm] [IR] Add llvm `clmul` intrinsic (PR #140301)

Nikita Popov via llvm-commits llvm-commits at lists.llvm.org
Sat May 24 12:05:46 PDT 2025


================
@@ -199,6 +199,25 @@ static Value *LowerCTLZ(LLVMContext &Context, Value *V, Instruction *IP) {
   return LowerCTPOP(Context, V, IP);
 }
 
+/// Emit the code to lower clmul of V1, V2 before the specified instruction IP.
+static Value *LowerCLMUL(LLVMContext &Context, Value *V1, Value *V2, Instruction *IP) {
----------------
nikic wrote:

> This essentially only covers fast isel (and is missing tests).

As far as I can tell, this code is not used by FastISel -- it is only used by ExecutionEngine/Interpreter. There's probably no need to support clmul here at all, or at least we haven't been doing this for other intrinsics. (And really, supporting intrinsics in an interpreter by lowering them to LLVM IR is unnecessarily roundabout...)

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


More information about the llvm-commits mailing list