[llvm-dev] Loads and stores of unsized types?

Sanjoy Das via llvm-dev llvm-dev at lists.llvm.org
Mon May 30 16:04:46 PDT 2016


This came up in D20764, this IR verifies today:

%X = type opaque

define void @f_0(%X* %ptr) {
  %t = load %X, %X* %ptr
  ret void
}

define void @f_1(%X %val, %X* %ptr) {
  store %X %val, %X* %ptr
  ret void
}

which I found surprising -- what does it mean to load / store values
of unknown sizes?  Passing it to llc fails an assertion.  Are there
legitimate cases where we'd want to generate such IR?

-- Sanjoy


More information about the llvm-dev mailing list