Reputation: 155
How can I get LHS and RHS of ICmpInst and FCmpInst in llvm?
I need these values of Sign, Code, Value *LHS, Value *RHS, Predicate. To do analysis of CmpInst. I could find all values except LHS, and RHS. Any idea..
Upvotes: 1
Views: 649
Reputation: 155
I could figure it out.
CmpInst* CI= dyn_cast<CmpInst>(&*I);
Value * LHS = CI->getOperand(0);
Value * RHS = CI->getOperand(1);
Upvotes: 3