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

Craig Topper via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Sep 1 08:59:07 PDT 2021


craig.topper added inline comments.


================
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.
----------------
frasercrmck wrote:
> 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.
It means the shl usage of the sext_inreg. I'll fix it.


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