Displaying 1 result from an estimated 1 matches for "issafetoeliminatevarargscast".
2011 Jul 29
1
[LLVMdev] alignment checking in isSafeToEliminateVarargsCast
...align 4, !tbaa !0
call void (i8*, ...)* @test(i8* getelementptr inbounds ([4 x i8]* @.str,
i32 0, i32 0), i64* byval %dw, %struct.LargeS_struct* byval %ls) nounwind
ret i32 0
}
This transformation seems to take place in InstCombiner::visitCallSite in
InstCombineCalls.cpp, which calls function isSafeToEliminateVarargsCast to
decide whether it is safe to eliminate a cast instruction and replace the
argument that is passed. Would it be possible to add code in
isSafeToEliminateVarargsCast that checks alignments of SrcTy and DstTy and
returns false if they are not the same? Or are there better ways to
circumvent this pr...