Skip to content

initializes attribute for pointers not supported #1125

@regehr

Description

@regehr

I'm getting pervasive arm-tv unit test failures because the middle end is inserting the initializes attribute like this:

define void @func_cvt51(ptr %0, ptr initializes((0, 8)) %1) local_unnamed_addr {
arm_tv_entry:
  %a3_114 = load <8 x i16>, ptr %0, align 1
  %2 = getelementptr i8, ptr %0, i64 16
  %a3_215 = load <8 x i16>, ptr %2, align 1
  %3 = shufflevector <8 x i16> %a3_114, <8 x i16> poison, <8 x i32> <i32 0, i32 2, i32 4, i32 6, i32 poison, i32 poison, i32 poison, i32 poison>
  %a4_19 = shufflevector <8 x i16> %3, <8 x i16> %a3_215, <8 x i32> <i32 0, i32 1, i32 2, i32 3, i32 8, i32 10, i32 12, i32 14>
  %a5_2 = trunc <8 x i16> %a4_19 to <8 x i8>
  store <8 x i8> %a5_2, ptr %1, align 1
  ret void
}

if the job here is to parse and ignore this attribute, then I can produce a patch. on the other hand, if we want to obligate the function to actually initialize that byte range, then the necessary changes are probably beyond my understanding of the memory model.

Metadata

Metadata

Assignees

No one assigned

    Labels

    memoryMemory Model

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions