[llvm] [IR] Add new CreateVectorInterleave interface and constant fold (PR #150931)

Luke Lau via llvm-commits llvm-commits at lists.llvm.org
Mon Jul 28 07:35:21 PDT 2025


================
@@ -189,6 +189,24 @@ class LLVM_ABI TargetFolder final : public IRBuilderFolder {
     return nullptr;
   }
 
+  Value *FoldVectorInterleave(ArrayRef<Value *> Ops) const override {
----------------
lukel97 wrote:

I guess we need a `llvm::ConstantFoldBinaryIntrinsic` in ConstantFolding.cpp, and call that from both ConstantFolder.h and InstructionSimplify.cpp's `ConstantFoldInstOperandsImpl`? That would bring it inline with the other the other instruction types.

And we probably need to rename that to just ConstantFoldIntrinsic?

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


More information about the llvm-commits mailing list