[llvm-dev] load instruction erroneously removed by GVN

Mikael Holmén via llvm-dev llvm-dev at lists.llvm.org
Fri Aug 7 05:02:28 PDT 2015



On 08/07/2015 01:53 PM, Caldarale, Charles R wrote:
>> From: llvm-dev [mailto:llvm-dev-bounces at lists.llvm.org]
>> On Behalf Of Mikael Holmén via llvm-dev
>> Subject: [llvm-dev] load instruction erroneously removed by GVN
>
>> But between the load and the alloca there is also
>>     call fastcc void @format_long(i16* %_tmp30, i16 10, i32 10), !dbg !22
>> which will use %_tmp30 to write in the alloca'd buffer.
>
>> Shoulnd't MemoryDependenceAnalysis::getDependency rather return the call?
>
> Depends.  What is the exact declaration of format_long?

In the input .ll file it is:

; Function Attrs: minsize optsize
define internal i16 @format_long(i16* %res.8.par, i16 %base.9.par, i32 
%x.10.par) #3 {

which is later changed somewhere in opt to:

; Function Attrs: minsize nounwind optsize
define internal fastcc i16 @format_long(i16* %res.8.par, i16 
%base.9.par, i32 %x.10.par) #2 {

Thanks,
Mikael

>
>   - Chuck
>
>
>



More information about the llvm-dev mailing list