Depends on D102498
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
I've added a recommendation that I believe will also simplify D102777.
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
17838–17861 | Although correct can I recommend a different approach. Rather than "any_extending" the scalable value you should be able to actually ISD::ANY_EXTEND the fixed length operand directly. This simplifies the lowering and means the any_extend->uunplo transform is kept in one place. The flow can be something like: src = bit cast(src_as_int, src) src = any_extend(dst_as_int, src) src = convertToScalable(src) src = svesafecast(src) src = fpextend(src) The legaliser will then transform the any_extend separately. | |
17888 | Although this is more direct, if you wanted to loose the line wrapping you can use changeTypeToInteger(). | |
17891–17910 | As above, by doing an actual ISD::TRUNCATE of the fixed length result you get to reuse the existing mechanism to lower fixed length truncates. I'm thinking: Val = convertFromScalableVector(DAG, SrcVT.changeTypeToInteger(), Val); Val = DAG.getNode(ISD::TRUNCATE, DL, VT.changeTypeToInteger(), Val); return DAG.getNode(ISD::BITCAST, DL, VT, Val); |
llvm/lib/Target/AArch64/AArch64ISelLowering.cpp | ||
---|---|---|
3218–3219 | This change looks unnecessary. | |
17842 | This can be SrcVT, which when combined with the next comment means ContainerSrcVT is no longer required. | |
17847 | I'm surprised this works as ContainerSrcVT and Val have different element types? Either way it seems safer to use ContainerDstVT.changeTypeToInteger(). | |
17867 | This can be VT, which means ContainerDstVT is no longer needed. | |
llvm/test/CodeGen/AArch64/sve-fixed-length-fp-extend-trunc.ll | ||
61–67 | In general for the fixed length arith tests we've added VBITS_EQ_256 CHECK lines to the 512bit tests, just to show sensible type legalisation (see sve-fixed-length-fp-reduce.ll). |
clang-tidy: warning: invalid case style for function 'LowerFixedLengthFPExtendToSVE' [readability-identifier-naming]
not useful