[LLVMdev] instcombine Question
David Greene
dag at cray.com
Wed Jul 16 13:32:48 PDT 2008
I see instcombine doing something I'm not sure is right.
Incoming, I have this:
%r29 = ptrtoint [71 x i64]* %"t$3" to i64 ; <i64> [#uses=1]
%r30 = inttoptr i64 %r29 to i64* ; <i64*> [#uses=1]
store i64 72057594037927936, i64* %r30, align 8
Outgoing, I have this:
%r30 = getelementptr [71 x i64]* %"t$3", i32 0, i32 0 ; <i64*> [#uses=1]
store i64 72057594037927936, i64* %r30, align 16
I believe the alignment on the outgoing store is wrong, but my question
concerns the optimization of the ptrtoint / intoptr to a gep. Is this
optimization allowed to pun the pointer type like this or should there be
a bitcast to i64* in there somewhere?
-Dave
More information about the llvm-dev
mailing list