In PR29973 I reported an assertion failure when a certain loop was
optimized, for a target without SSE2 support. It turned out this was
because of the AVG pattern detection introduced in rL253952.
Prevent the assertion failure by bailing out early in
detectAVGPattern(), if the target does not support SSE2.
You can remove the 'else':
http://llvm.org/docs/CodingStandards.html#don-t-use-else-after-a-return