[llvm-dev] Can someone take a quick look at this?

David Lurton via llvm-dev llvm-dev at lists.llvm.org
Sat Jul 22 18:45:00 PDT 2017


What am I not seeing?

Any idea why @initModule is returning a random value as if from
uninitialized memory?

; ModuleID = 'test_4'
source_filename = "test_4"
target datalayout = "e-m:e-i64:64-f80:128-n8:16:32:64-S128"

@foo = global i32 0, align 4
@bar = external global float, align 4

define i32 @initModule() {
EntryBlock:
  store i32 123, i32* @foo, align 4
  %0 = load i32, i32* @foo, align 4
  ret i32 %0
}


If the answer is not obvious I'll work on creating a minimal reproduction
case...  I was just hoping that someone else could see something obvious
that I'm missing.

Thanks.
-David
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20170722/c47815ba/attachment.html>


More information about the llvm-dev mailing list