Skip to content

[LoopIdiomRecognizer] creates memset_pattern16 with incorrect size type with custom dl #57679

Description

@nunoplopes

Take, e.g., Transforms/LoopIdiom/unroll-custom-dl.ll. It creates this call:

; 64-bit size, 32-bit offset
target datalayout = "e-p:64:64:64:32-..."

  call void @memset_pattern16(i8* %f1, i8* bitcast ([4 x i32]* @.memset_pattern to i8*), i32 %3)

TargetLibraryInfo.def has this:

/// void memset_pattern16(void *b, const void *pattern16, size_t len);
TLI_DEFINE_ENUM_INTERNAL(memset_pattern16)
TLI_DEFINE_STRING_INTERNAL("memset_pattern16")
TLI_DEFINE_SIG_INTERNAL(Void, Ptr, Ptr, SizeT)

The end result is that the function isn't recognized as a libcall as there's a mismatch.
I believe the code shouldn't be using the index type for the last argument.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions