This is an extension to the code for sinking splats to multiplies, where if we can detect that the top bits are known-zero we can treat the instruction like a zext. The existing code was also adjusted in the process to make it more precise about only sink if both operands are zext or sext.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
14089 | Would an early return within the loop in the case of NumSExts > 2 && NumZExts > 2 make sense? |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
14089 | I'm working under the assumption that a mul can only have 2 operands. The loop is just checking both of them. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
14089 | I see, cool. Semantically an early return and not is the same thing when assuming 2 operands so LGTM. |
Would an early return within the loop in the case of NumSExts > 2 && NumZExts > 2 make sense?