[RISCV] Modify add.uw patterns to put the masked operand in rs1 to match 0.93 bitmani...
authorCraig Topper <craig.topper@sifive.com>
Fri, 22 Jan 2021 19:33:47 +0000 (11:33 -0800)
committerCraig Topper <craig.topper@sifive.com>
Fri, 22 Jan 2021 20:49:10 +0000 (12:49 -0800)
commit9d499e037e6bc3365e6ad1423a388dc7a37627b0
treec053c120d2c876b2dc5fed288c5afddc51793992
parentefbcd66861dbfe4bb3c3c2d83515ca38bb7f18e2
[RISCV] Modify add.uw patterns to put the masked operand in rs1 to match 0.93 bitmanip spec.

The 0.93 spec has this implementation for add.uw

uint_xlen_t adduw(uint_xlen_t rs1, uint_xlen_t rs2) {
  uint_xlen_t rs1u = (uint32_t)rs1;
  return rs1u + rs2;
}

The 0.92 spec had the usages of rs1 and rs2 swapped.

Reviewed By: frasercrmck, asb

Differential Revision: https://reviews.llvm.org/D95090
llvm/lib/Target/RISCV/RISCVInstrInfoB.td
llvm/test/CodeGen/RISCV/rv64Zba.ll