[RISCV] Add more SHXADD isel patterns.
This handles the code we get for int foo(int* x, unsigned y) { return x[y >> 1]; } The shift right and the shl will get DAG combined into (shl (and X, 0xfffffffe), 1). We have custom isel to match the shl+and, but with Zba the (add (shl X, 1), Y) part will get matched and leave the and to be iseled by itself. This commit adds a larger pattern that includes the and.
Loading
Please sign in to comment