Some of the Arm complex pattern functions call canExtractShiftFromMul, which can modify the DAG in-place. For this to be valid and handled successfully we need to define ComplexPatternFuncMutatesDAG.
The test case is a little big, but I didn't have a lot of luck reducing it further.
clang-format: please reformat the code