[RISCV] Add another isel pattern for slliu.w.
authorCraig Topper <craig.topper@sifive.com>
Wed, 20 Jan 2021 22:52:03 +0000 (14:52 -0800)
committerCraig Topper <craig.topper@sifive.com>
Wed, 20 Jan 2021 22:54:40 +0000 (14:54 -0800)
commite996f1d4194bccf1c8ca984d695b848c0093bc23
tree66f56284d363a97e0f53bf04b2a05e2e9f77c393
parent0f8386c4f6aa804fe43814fcb3ae29d271da82d7
[RISCV] Add another isel pattern for slliu.w.

Previously we only matched (and (shl X, C1), 0xffffffff << C1)
which matches the InstCombine canonicalization order. But its
possible to see (shl (and X, 0xffffffff), C1) if the pattern
is introduced in SelectionDAG. For example, through expansion of
a GEP.
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv64Zbb.ll