[PATCH] D121152: [RISCV] Add more sign-extending ops to MIR sext.w pass.

Mohammed Nurul Hoque via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Mon Mar 7 12:57:36 PST 2022


mohammed-nurulhoque created this revision.
mohammed-nurulhoque added reviewers: asb, craig.topper, kito.cheng.
Herald added subscribers: VincentWu, luke957, achieveartificialintelligence, vkmr, frasercrmck, evandro, luismarques, apazos, sameer.abuasal, s.egerton, Jim, benna, psnobl, jocewei, PkmX, the_o, brucehoult, MartinMosbeck, rogfer01, edward-jones, zzheng, jrtc27, kito-cheng, niosHD, sabuasal, simoncook, johnrusso, rbar, hiraditya.
Herald added a project: All.
mohammed-nurulhoque requested review of this revision.
Herald added subscribers: llvm-commits, pcwang-thead, eopXD, MaskRay.
Herald added a project: LLVM.

This patch adds single-bit and bit-counting ops to list of sign-extending ops.

A single-bit write propagates sign-extendedness if it's not in the sign-bits.

Bit extraction and bit counting always outputs a small number, so sign-extended.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D121152

Files:
  llvm/lib/Target/RISCV/RISCVSExtWRemoval.cpp
  llvm/test/CodeGen/RISCV/sextw-removal.ll

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D121152.413600.patch
Type: text/x-patch
Size: 7353 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20220307/85ae376a/attachment.bin>


More information about the llvm-commits mailing list