Change an instruction to another instruction

Hello There,

I want to change an instruction to another instruction as given below:-

original: %count4 = getelementptr inbounds %struct.r32, %struct.r32* %cur.088, i64 0, i32 4,

to :

store i32 100,%count4

Thanks

Regards,

Bernard

Hi Bernard,

Could you please explain a little bit more the context? I don’t get how you want to store upon a memory location that does not exist (if you remove the gep instruction). However to manage instructions you should take a look at Instruction and IRBuilder documentation: - (to create and insert any instruction) - (to erase or remove) Hope that helps, Pierre