However, whenever there is a constant operand like a numerical value, it
does not displays any value at all, i checked using the hasName() method,
for the constant operands the hasName() returns 0.
Correct. Constant doesn't have name at all. You should check, whether
operand is a constant, cast the Value to Constant (for example, via
dyn_cast facility) and then use the Constant' methods to obtain the
How can i extract the name of the instruction i.e. %tmp6
getName() will return it.