Detects patterns that copies the higher half of an element to its lower half.
Example, it replaces the pattern:
x= (zext i8 ( load 1 [M+1] ) to i16)
x2= i16 or(x, shl(x, 8))
store 1 (truncate i16 x2 to i8) [M]
by:
x = i8 load 1 [M+1]
store 1 i8 x [M]
I think the comment here can be improved. e.g. 'load 1 from M' is confusing. You probably mean load i8 from memory?
Also, it looks like you are combing two points into one statement which may confuse readers. Better to simplify it.