[PATCH] D108965: [RISCV] Add a test case showing an extra sext.w near a sh2add with multiple uses. NFC

Fraser Cormack via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 01:46:36 PDT 2021


frasercrmck accepted this revision.
frasercrmck added a comment.
This revision is now accepted and ready to land.

LGTM.



================
Comment at: llvm/test/CodeGen/RISCV/rv64zba.ll:377
+; to remove the sext_inreg because it has multiple uses. The ashr will use the
+; sext_inreg to become sraiw. The shl usage is unnecessary if it is selected
+; as a sllw.
----------------
I'm not quite sure what `The shl usage is unnecessary` means here. I think it's the word "usage" here which is a bit overloaded in this context. Is this saying that the `shl` user of the `sext_inreg` shouldn't "count" if it's selected as `sllw` because it sign extends its input anyway?

My first thought was "usage" meant the `shl` itself is unnecessary in the program, which isn't right. I might be overcomplicating things based on my initial reading.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D108965



More information about the llvm-commits mailing list