[PATCH] D62857: [RISCV] Prevent re-ordering some adds after shifts
Sam Elliott via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Tue Jun 18 07:55:32 PDT 2019
lenary updated this revision to Diff 205350.
lenary added a comment.
Address review feedback
- Update `getIntMatCost` to take an integer size (in bits). This ensures we chunk the constant correctly for the legal types on the target, and account for the costs of all required chunks. I was unable to devise a simple test case for when this behaviour would not match the behaivour using `getMinSignedBits`, due to legalisation always splitting the wider type before the `isDesirableToCommuteWithShift` callback is called.
The chunking will automatically expand each chunk to be the platform register width, so we don't need to sign extend the constant to be a multiple of that width before we start chunking.
- Update and de-duplicate comments on tests and implementations
- Update naming of `IsRV64` parameter in RISCVMatInt.{h,cpp}
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D62857/new/
https://reviews.llvm.org/D62857
Files:
llvm/lib/Target/RISCV/RISCVISelLowering.cpp
llvm/lib/Target/RISCV/RISCVISelLowering.h
llvm/lib/Target/RISCV/Utils/RISCVMatInt.cpp
llvm/lib/Target/RISCV/Utils/RISCVMatInt.h
llvm/test/CodeGen/RISCV/add-before-shl.ll
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D62857.205350.patch
Type: text/x-patch
Size: 8530 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190618/6b93a344/attachment.bin>
More information about the llvm-commits
mailing list