I noticed that legalizer could keep an original mask type of masked load combined with sign/zero extend, but we have to extend the mask to a type similar to our combined load otherwise instruction selection could not lower the load.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
24974–24982 | It is better to just call this Mask, because you're overwriting the "original" value of Mask with an extended version, so MaskOrig is a misnomer. | |
24975 | Given that the number of elements between VT and the predicate mask should match, this can compare the size of element type directly (as opposed to comparing the size of the whole vector). | |
llvm/test/CodeGen/AArch64/sve-streaming-mode-fixed-length-masked-load.ll | ||
409 | This attribute is unnecessary for the test. The important thing is that this function is compiled for 'streaming-compatible SVE', which is already enforced by the flag passed to llc. | |
409 | +sme is also not necessary for this test. |
Changed call ISD::isNormalLoad() to getExtensionType() != ISD::NON_EXTLOAD, since non normal load could be an indexing load.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
24977 | No tests failed, but I think it can only occur if the load is extending. |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
24977 | Do you want to make it into an assert then? |
Given that the number of elements between VT and the predicate mask should match, this can compare the size of element type directly (as opposed to comparing the size of the whole vector).