This function will currently checks for consecutive extracts but it won't check:
a. If these extracts have the same operand, and
b. If any of the values is not an extract.
In either of these cases the cost should be higher because it would require
additional instructions to move the data into a common register.
This patch adds the checks for the non-extract value and for common operand.