[PATCH] D119532: [RISCV] Extend sext.w removal pass to remove unused sign-extensions

Mohammed Nurul Hoque via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Feb 16 03:34:08 PST 2022


mohammed-nurulhoque added a comment.

Thanks for your comments. As I mentioned, this patch is actually first half of a larger patch which I now uploaded as a signle patch here https://reviews.llvm.org/D119928 (didn't request reviews there yet). The main thing is transforming instructions to their W variant to eliminate sext.w occurences. With that change, checking for unused sext.w was just cheap to add because we already have the isAllUsesReadW function.

I originally broke it into 2 parts because I thought it would be too big for a single review, but I'm finding it hard to isolate a test case for the first part (this review) that wouldn't be optimized out by the middle-end. The full patch linked above has more convincing tests cases. Please do check the full patch and let me know if you think I should proceed with the full patch as a single review and cancel this one.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D119532/new/

https://reviews.llvm.org/D119532



More information about the llvm-commits mailing list