My pass in LLVM generates an IR like this
%5 = icmp eq i32 %4, 0
%7 = or i1 %5, %5
;. . .
Since the ‘or’ instruction is actually not needed(dead code), I replaced all occurences of %7 with %5.
Now, the ‘or’ instruction should get deleted. How can I call Dead Code Elimination pass of LLVM from my pass or is there any method to remove that ‘or’ instruction?
Thank you.
Adarsh Konchady