[LLVMdev] Puzzled by results of -O3

Stephan stephan.reiter at gmail.com
Thu Nov 12 02:42:42 PST 2009


On 11 Nov., 13:23, Duncan Sands <baldr... at free.fr> wrote:
> Hi Stephan,
>
> > I'm trying to figure out why the following sequence of intructions is
> > not collapsed to "ret i32 0" by the opt tool with "-03".
>
> no target data maybe?
>

Hmmm, my jitter-based application, which spit out this piece of code,
adds target data to the passmanager that's used to carry out code
optimizations. So, I think I've got this covered.

It's interesting that Timo's approach with a single-value store
instead of an aggregate store works. Could it be possible that a type
mismatch (pointer to array of ints vs. pointer to int(s)) breaks GVN?

Stephan



More information about the llvm-dev mailing list