[LLVMdev] generate a weird 'and' instruction
Qiuping Yi
yiqiuping at gmail.com
Tue Aug 21 01:19:58 PDT 2012
When I use the next code to print all the opcode name in a file xx.o whose
source file contains statements "if (diff != 0) klee_assume(diff>0)", then
an opcode name 'and' was printed. Where is the 'and' instruction from? I
checked the file xx.ll of xx.o and I didn't find a 'and' instruction of
these two statements.
Besides, when I commented out statement "if (diff != 0)", the 'and'
instruction disappeared.
for (llvm::Module::iterator itf = module->begin(); itf != module->end();
++itf) {
llvm::Function *f = itf;
for (llvm::Function::iterator itb = f->begin(); itb != f->end();
++itb) {
llvm::BasicBlock *bb = itb;
for (llvm::BasicBlock::iterator iti = bb->begin(); iti !=
bb->end(); ++iti) {
llvm::Instruction *i = iti;
*msg << i->getOpcodeName() << "\n";
}
}
}
--------------------------------------------
Qiuping Yi
Institute Of Software
Chinese Academy of Sciences
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20120821/3c8f6976/attachment.html>
More information about the llvm-dev
mailing list