Selection DAG:
Does not lower FSHR if the amount of shifts is a constant.
Lowers FSHL to FSHR instead of EXTR.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
Thanks. Can you go through and remove the commented out code, and format the rest?
It looks like there is one nice improvement and one regression, (which is in BE i20 vector expansion).
Remember to upload with context. It can make the patches easier to read, thanks.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
5805 | Can you expand this comment a little to say that it treats fshr with constant shifts as legal, fshl is converted to fshr and the others are expanded. Does it need to check that the constant is within the right range? Or does that happen automatically somehow? | |
5810 | dl is used in several places in this file, but in general llvm prefers CamelCase for variable names, which for this would make it DL. | |
5814 | newShiftNo -> NewShiftNo |
I looked into the BE i20 case but considering how narrow in scope it is, I think this will be OK.
LGTM, with a couple of extra suggestions.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
-25 | unsigned on its own is commonly used in LLVM as a type. | |
-31 | I'm not sure what this comment means. Is it just explaining that the funnel shifts with constant shift amounts are legal or converted to FSHR? |
I'm not sure what this comment means. Is it just explaining that the funnel shifts with constant shift amounts are legal or converted to FSHR?