[LLVMdev] Overly restrictive size argument to llvm.invariant.start

Geoff Reedy geoff at programmer-monk.net
Thu Jul 28 22:57:02 PDT 2011


Why is it that @llvm.invariant.start requires the size argument to be a
constant integer literal and does not accept constant expressions? For
example the following IR:

declare {}* @llvm.invariant.start(i64,i8*)
define void @foo() {
  %1 = call {}* @llvm.invariant.start(i64 ptrtoint(i8* getelementptr(i8*
  %null, i32 1) to i64), i8* null)
  ret void
}

gives the following error from llvm-as:

size argument of memory use markers must be a constant integer

-- Geoff Reedy



More information about the llvm-dev mailing list