[all-commits] [llvm/llvm-project] be0a3b: [IR] Allow llvm.experimental.memset.pattern to tak...

Alex Bradbury via All-commits all-commits at lists.llvm.org
Wed Mar 19 07:18:04 PDT 2025


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: be0a3b223a10e0a3e588b1d6002581982968f0f4
      https://github.com/llvm/llvm-project/commit/be0a3b223a10e0a3e588b1d6002581982968f0f4
  Author: Alex Bradbury <asb at igalia.com>
  Date:   2025-03-19 (Wed, 19 Mar 2025)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/IR/Intrinsics.td
    M llvm/lib/IR/Verifier.cpp
    A llvm/test/Verifier/memset-pattern-unsized.ll

  Log Message:
  -----------
  [IR] Allow llvm.experimental.memset.pattern to take any sized type as the pattern argument (#132026)

I initially thought starting with a more narrow definition and later
expanding would make more sense. But as pointed out in review for PR
#129220, this restriction is generating additional unnecessary work.

This patch alters the intrinsic to accept patterns of any type. Future
patches will update LoopIdiomRecognize and PreISelIntrinsicLowering to
take advantage of this. The verifier will complain if an unsized type is
used. I've additionally taken the opportunity to remove a comment from
the LangRef about some bit widths potentially not being supported by the
target. I don't think this is any more true than it is for arbitrary
width loads/stores which don't carry a similar warning that I can see.

A verifier check ensures that only sized types are used for the pattern.



To unsubscribe from these emails, change your notification settings at https://github.com/llvm/llvm-project/settings/notifications


More information about the All-commits mailing list